{smcl}
{txt}{sf}{ul off}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\hy65byfe\Desktop\smerge_0712\welfare_analysis_table.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 Mar 2023, 15:36:52
{txt}
{com}. 
. keep if year == 2011 // reduce data size 
{txt}(514,800 observations deleted)

{com}. 
. codebook cell // 4950, but still 50 cells in bunching region.  

{txt}{hline}
{res}cell{right:(unlabeled)}
{txt}{hline}

{col 19}Type: Numeric ({res}float{txt})

{col 18}Range: [{res}1{txt},{res}4950{txt}]{col 55}Units: {res}1
{col 10}{txt}Unique values: {res}4,950{col 51}{txt}Missing .: {res}0{txt}/{res}39,600

{txt}{col 19}Mean: {res}{ralign 7:2475.5}
{txt}{col 14}Std. dev.: {res}{ralign 7:1428.96}

{txt}{col 12}Percentiles: {col 25}{ralign 7:10%}{ralign 10:25%}{ralign 10:50%}{ralign 10:75%}{ralign 10:90%}
{res}{col 25}{ralign 7:495.5}{ralign 10:    1238}{ralign 10:  2475.5}{ralign 10:    3713}{ralign 10:  4455.5}
{txt}
{com}. 
. sort cell // first bunching (1-50), then restricted (51-1015) then rest. 
{txt}
{com}. 
. gsort -bunching +cell 
{txt}
{com}. gen bcell = _n if bunching == 1 // identify B
{txt}(39,200 missing values generated)

{com}. 
. gsort -restricted +cell 
{txt}
{com}. gen rcell = _n if restricted == 1 // identify R
{txt}(16,800 missing values generated)

{com}. 
. 
. *** policy variables ***
. 
. scalar E_bar = 1000/220 // benchmark above the max in empirical distribution
{txt}
{com}. 
. scalar K = (51.7*0.59)/220 // scaled to days
{txt}
{com}. 
. scalar kappa = E_bar - `=K' // at compliance line, in days. 
{txt}
{com}. 
. scalar sigma = (47*0.59)/220 // at compliance line, in days
{txt}
{com}. 
. 
. *** parameters: beta, gamma ****
.         
. scalar beta = 0 // by assumption 
{txt}
{com}. 
. scalar gamma = sigma //  
{txt}
{com}. 
. scalar tolerance = (1/220) // tolerance factor
{txt}
{com}. 
. 
. *** E and EEI in spatial structure ***
. gen E_bin = (k_bin/220) + a_bin*`=sigma' // set to midpoint of each cell  
{txt}
{com}.  
. replace eei_bin = ((E_bin*220)/(51.7+47*a_bin))* 100 // reset eei_bin to align with compliance line 
{txt}(39,560 real changes made)

{com}. 
. *****************************************************
. *****************************************************
. *** 1) preference parameters
. 
. 
. gen a_0 =               a_bin                                           //  pre-ban choice 
{txt}
{com}. 
. gen e_0 =               E_bar   - E_bin                         // daily Es, now e from theory. 
{txt}
{com}. 
. gen alpha =     a_0     + beta  + e_0*gamma // beta drops out in simplified theory
{txt}
{com}. 
. gen epsilon =   e_0     + a_0*gamma             //  preference for energy efficiency 
{txt}
{com}. 
. 
. *****************************************************
. *****************************************************
. *** 2) predicted adjustment 
. 
. * preserve 
. 
. * gen e_gap =   ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma)  //  
. 
. * gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )     // 
. 
. replace restricted = 0 // reset 
{txt}(22,800 real changes made)

{com}. replace restricted = 1 if e_0 < kappa - sigma*a_0 - tolerance // restricted = 1 if location is incompliant for given parameters 
{txt}(22,600 real changes made)

{com}. 
. gen e_gap = kappa - e_0 - sigma*a_0 // adjustment in e 
{txt}
{com}. 
. gen a_gap = (sigma - gamma)*e_gap    // zero if sigma = gamma 
{txt}
{com}. 
. gen e_star =    e_gap + e_0                                     // post-regulation optimal choice  
{txt}
{com}. 
. gen a_star =    a_gap + a_0                                     // 0 for sigma = gamma.    
{txt}
{com}. 
. 
. sum alpha // preferences in size  

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}alpha {c |}{res}     39,600    9.387548    3.549673   3.313571   15.46152
{txt}
{com}. 
. sum epsilon // preferences in energy efficiency  

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}epsilon {c |}{res}     39,600    4.209077    .7794228   2.865895   5.552259
{txt}
{com}. 
. 
. *****************************************************
. *****************************************************
. *** 3) evaluate Delta V. 
. 
. gen V_gap = 0.5*(e_star - e_0)^2  // formula simplifies when sigma = gamma 
{txt}
{com}. 
. gen E_star = E_bar - e_star  // expressed as consumption
{txt}
{com}. 
. 
. *****************************************************
. *****************************************************
. *** 4.a) sum up weights (i.e. sales volume)
. 
.         *** aggregate 
. sort year restricted 
{txt}
{com}. 
. by year, sort: egen w_sum_T =sum(cell_year_sales)  // compute restricted fraction 
{txt}
{com}. 
. by year restricted, sort: egen w_sum_R =sum(cell_year_sales) if restricted== 1 // by year
{txt}(17,000 missing values generated)

{com}. 
. gen R_ratio = w_sum_R/w_sum_T
{txt}(17,000 missing values generated)

{com}. 
. by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt}
{com}. 
. by year restricted, sort: egen p_sum_R =sum(cell_year_count) if restricted == 1 // by year
{txt}(17,000 missing values generated)

{com}.         
. gen P_ratio = p_sum_R/p_sum_T
{txt}(17,000 missing values generated)

{com}.         
. *****************************************************
. *****************************************************
. *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
. gen V_sum_cell = V_gap*cell_year_sales 
{txt}
{com}. 
.         *** aggregate 
. sort year restricted 
{txt}
{com}. 
. by year restricted, sort: egen V_sum_R =sum(V_sum_cell) if restricted== 1 // by year
{txt}(17,000 missing values generated)

{com}. 
.  
. sum V_gap if restricted == 1 & year == 2011 // expect: positiv bc V_0 > V_star 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}V_gap {c |}{res}     22,600    .4010021    .3568826    .000093   1.187201
{txt}
{com}. 
. sum V_gap V_sum_cell V_sum_R if restricted == 1 & year == 2011 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}V_gap {c |}{res}     22,600    .4010021    .3568826    .000093   1.187201
{txt}{space 2}V_sum_cell {c |}{res}     22,600    .2348165    14.06472          0   1915.642
{txt}{space 5}V_sum_R {c |}{res}     22,600    5306.853           0   5306.853   5306.853
{txt}
{com}. 
. *codebook V_sum_R // 14 unique values, one for each year, missings: non-restricted cells.
. 
. tab cell a_bin if V_gap < 0 & restricted == 1 & year == 2011 // none.  
{txt}no observations

{com}.  
. 
. 
. *****************************************************
. *****************************************************
. *** 5.a) sum up changes in E  and a 
. 
. gen E_gap = E_bin -  E_star // 600 drops out: e_gap = 600 - e_star - 600 + e_0. 
{txt}
{com}. 
.                 *** energy savings correspond to "negawatt":  E_gap = E_o - E_star = e_0 + e_star  
. 
. sum E_gap a_gap if restricted == 1 & year == 2011 // E_gap must be positive. E_0 > E*. 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     22,600    .7772728    .4448146   .0136362   1.540909
{txt}{space 7}a_gap {c |}{res}     22,600           0           0          0          0
{txt}
{com}. 
. gen E_gap_cell = E_gap*cell_year_sales 
{txt}
{com}. 
. sort year restricted 
{txt}
{com}. 
. by year restricted, sort: egen E_sum_R =sum(E_gap_cell) if restricted== 1 // aggregate for year and segment 
{txt}(17,000 missing values generated)

{com}. 
. gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted consumers 
{txt}(17,000 missing values generated)

{com}. 
.                 *** for a: same process
.                 
. gen a_gap_cell = a_gap*cell_year_sales 
{txt}
{com}.                 
. sort year restricted 
{txt}
{com}. 
. by year restricted, sort: egen a_sum_R =sum(a_gap_cell) if restricted== 1 // by year, replace 
{txt}(17,000 missing values generated)

{com}. 
. gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted consumers. 
{txt}(17,000 missing values generated)

{com}. 
. 
. *****************************************************
. *****************************************************
. *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
. gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations, multiplied by sales volume in cell. 
{txt}
{com}. 
.         *** aggregate in R 
. sort year restricted 
{txt}
{com}. 
. by year restricted, sort: egen D_sum_R =sum(D_sum_cell) if restricted== 1 // sum over R. 
{txt}(17,000 missing values generated)

{com}. 
.         *** mean of the above. 
. gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt}(17,000 missing values generated)

{com}. 
.  
. sum D_sum_cell D_mean_R if restricted == 1 & year == 2011 // expect: positive when V_0 > V_star 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     22,600     .469633    28.12945          0   3831.285
{txt}{space 4}D_mean_R {c |}{res}     22,600    .0255509           0   .0255509   .0255509
{txt}
{com}. 
.         *** repeat for a // adjustment is zero for empirical case, < 0 for flat regulations 
.         
. gen DA_sum_cell = cell_year_sales*(a_gap)^2 // squared sum of deviations, times sales volume in cell. 
{txt}
{com}. 
.         *** aggregate in R 
. sort year restricted 
{txt}
{com}. 
. by year restricted, sort: egen DA_sum_R =sum(DA_sum_cell) if restricted== 1 // sum over R. 
{txt}(17,000 missing values generated)

{com}. 
.         *** mean of the above. 
. gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt}(17,000 missing values generated)

{com}. 
.  
. sum DA_sum_cell DA_mean_R if restricted == 1 & year == 2011 // zero for ABR  

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     22,600           0           0          0          0
{txt}{space 3}DA_mean_R {c |}{res}     22,600           0           0          0          0
{txt}
{com}. 
. 
. *****************************************************
. *****************************************************
. *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
. gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt}(17,000 missing values generated)

{com}. 
. 
. sum cv_R D_mean_R E_mean_R if restricted == 1 & year == 2011 // expect: positive when V_0 > V_star 

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     22,600    1.666178           0   1.666178   1.666178
{txt}{space 4}D_mean_R {c |}{res}     22,600    .0255509           0   .0255509   .0255509
{txt}{space 4}E_mean_R {c |}{res}     22,600     .095936           0    .095936    .095936
{txt}
{com}. 
. 
. *****************************************************
. *****************************************************
. *** 6) utility ratio  
. 
. 
. gen U_ratio = V_sum_R / E_sum_R 
{txt}(17,000 missing values generated)

{com}. 
. ** utility loss / unit of savings ; sum of savings ; sum of loss ; mean loss ; mean variance of loss ; coeffcient of variation; sum of weights ; proportion of restricted product space 
. 
. *sum U_ratio E_sum_R V_sum_R E_mean_R D_mean_R cv_R w_sum_R restricted if year == 2011 
. 
. 
. sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted if year == 2011 // all outputs reported in table  

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     22,600    415394.6           0   415394.6   415394.6
{txt}{space 5}E_sum_R {c |}{res}     22,600    39851.29           0   39851.29   39851.29
{txt}{space 4}E_mean_R {c |}{res}     22,600     .095936           0    .095936    .095936
{txt}{space 4}D_mean_R {c |}{res}     22,600    .0255509           0   .0255509   .0255509
{txt}{space 5}V_sum_R {c |}{res}     22,600    5306.853           0   5306.853   5306.853
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     22,600    .1331664           0   .1331664   .1331664
{txt}{space 5}a_sum_R {c |}{res}     22,600           0           0          0          0
{txt}{space 4}a_mean_R {c |}{res}     22,600           0           0          0          0
{txt}{space 3}DA_mean_R {c |}{res}     22,600           0           0          0          0
{txt}{space 8}cv_R {c |}{res}     22,600    1.666178           0   1.666178   1.666178
{txt}{hline 13}{c +}{hline 57}
{space 2}restricted {c |}{res}     39,600    .5707071    .4949815          0          1
{txt}
{com}. 
. local i 1 
{txt}
{com}.         quietly gen w_sum_R_`i' = w_sum_R
{txt}
{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt}
{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt}
{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt}
{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt}
{com}.         quietly gen U_ratio_`i' = U_ratio
{txt}
{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt}
{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt}
{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt}
{com}.         quietly gen cv_R_`i' = cv_R
{txt}
{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt}
{com}.         quietly gen a_gap_`i' = a_gap
{txt}
{com}.         quietly gen V_gap_`i' = V_gap 
{txt}
{com}.         quietly gen restricted_`i' = restricted
{txt}
{com}.         
.         
.         ***** flat ***** 
.         
.                 **** case 1 ****
. scalar sigma = 0 // initial: 3.8330
{txt}
{com}. scalar case = 7 // numbering the alternative policy designs 
{txt}
{com}. 
. forvalues i = 3633250(1)3633259 {c -(}       
{txt}  2{com}.         
.         scalar kappa = `i'/1000000
{txt}  3{com}.         local k = kappa
{txt}  4{com}.         local j = case // first column in table  
{txt}  5{com}.         
.                 *** drop variables from previous loop 
.         drop e_gap-U_ratio // reset to overwrite 
{txt}  6{com}.         
.         gen restricted_`i'_`j' = 0 
{txt}  7{com}.         replace restricted_`i'_`j' = 1 if e_0 < kappa - sigma*a_0 - tolerance
{txt}  8{com}. 
.  
.         *****************************************************
.         *****************************************************
.         *** 2) predicted adjustment 
. 
. 
.         gen e_gap =     ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma) // equivalent to E_gap 
{txt}  9{com}.         
.         *replace e_gap = 0 if e_gap < 0 //  
.         
.         gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )
{txt} 10{com}. 
.         gen  e_star =   e_gap + e_0                                     // 
{txt} 11{com}. 
.         gen  a_star =   a_gap + a_0                                     //    
{txt} 12{com}. 
.  
.         *****************************************************
.         *****************************************************
.         *** 3) evaluate Delta V. 
. 
.         gen  V_gap = 0.5*(1-gamma^2)/(1-2*sigma*gamma+sigma^2)*(e_star - e_0)^2  //  
{txt} 13{com}.         
.         ** test 
. 
.         gen  E_star = E_bar - e_star  
{txt} 14{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 4.a) sum up weights (i.e. sales volume)
. 
.         
.         sort year restricted_`i'_`j' 
{txt} 15{com}.         
.         by year, sort: egen w_sum_T =sum(cell_year_sales)  // compute restricted_`i'_`j' fraction 
{txt} 16{com}. 
.         by year restricted_`i'_`j', sort: egen w_sum_R =sum(cell_year_sales) if restricted_`i'_`j'== 1 // by year
{txt} 17{com}. 
.         gen R_ratio = w_sum_R/w_sum_T
{txt} 18{com}. 
.         by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt} 19{com}. 
.         by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
{txt} 20{com}.         
.         gen P_ratio = p_sum_R/p_sum_T
{txt} 21{com}. 
.         *by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
.         
. 
.         *****************************************************
.         *****************************************************
.         *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
.         gen V_sum_cell = V_gap*cell_year_sales 
{txt} 22{com}. 
.         *** aggregate by year and segment 
.         
.         sort year restricted_`i'_`j' 
{txt} 23{com}. 
.         by year restricted_`i'_`j', sort: egen V_sum_R =sum(V_sum_cell) if restricted_`i'_`j' == 1 // by year
{txt} 24{com}. 
.         /* 
>         sum V_gap if restricted_`i'_`j' == 1 & year == 2011 // 
> 
>         sum V_gap V_sum_cell V_sum_R if restricted_`i'_`j' == 1 & year == 2011 
> 
>         codebook V_sum_R // 
> 
>         tab cell a_bin if V_gap < 0 & restricted_`i'_`j' == 1 & year == 2011 //  
>         */ 
. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.a) sum up changes in E  and a 
. 
.         
.         gen E_gap = e_star - e_0  
{txt} 25{com}. 
.         sum E_gap a_gap if restricted_`i'_`j' == 1 & year == 2011 // E_gap is positive. E_0 > E*. 
{txt} 26{com}. 
.         gen E_gap_cell = E_gap*cell_year_sales 
{txt} 27{com}. 
.         sort year restricted_`i'_`j' 
{txt} 28{com}. 
.         by year restricted_`i'_`j', sort: egen E_sum_R =sum(E_gap_cell) if restricted_`i'_`j'== 1 // 
{txt} 29{com}. 
.         gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 30{com}.                 
.         gen a_gap_cell = a_gap*cell_year_sales 
{txt} 31{com}.                 
.         sort year restricted_`i'_`j' 
{txt} 32{com}. 
.         by year restricted_`i'_`j', sort: egen a_sum_R =sum(a_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 33{com}. 
.         gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 34{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
.         gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations, multiplied by sales volume in cell. 
{txt} 35{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 36{com}. 
.         by year restricted_`i'_`j', sort: egen D_sum_R =sum(D_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 37{com}. 
.         *** mean of the above. 
.         gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt} 38{com}. 
.         *sum D_sum_cell D_mean_R if restricted_`i'_`j' == 1 & year == 2011 // expect: positive when V_0 > V_star 
. 
.         *** repeat for a 
.         
.         gen DA_sum_cell = cell_year_sales*(a_gap)^2 // 
{txt} 39{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 40{com}. 
.         by year restricted_`i'_`j', sort: egen DA_sum_R =sum(DA_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 41{com}. 
.         *** mean of the above. 
.         gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt} 42{com}.  
.         sum DA_sum_cell DA_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 43{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
.         gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt} 44{com}. 
.         sum cv_R D_mean_R E_mean_R if restricted_`i'_`j' == 1 & year == 2011 
{txt} 45{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 6) utility ratio  
.         display kappa 
{txt} 46{com}. 
.         gen U_ratio = V_sum_R / E_sum_R 
{txt} 47{com}.         
.         sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted_`i'_`j' if year == 2011 // output in table 
{txt} 48{com}.         
.         quietly gen w_sum_R_`i' = w_sum_R
{txt} 49{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt} 50{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt} 51{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt} 52{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt} 53{com}.         quietly gen U_ratio_`i' = U_ratio
{txt} 54{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt} 55{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt} 56{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt} 57{com}.         quietly gen cv_R_`i' = cv_R
{txt} 58{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt} 59{com}.         quietly gen a_gap_`i' = a_gap
{txt} 60{com}.         quietly gen V_gap_`i' = V_gap 
{txt} 61{com}.         quietly gen restricted_`i' = restricted_`i'_`j'
{txt} 62{com}. * restore       
.         
. {c )-}       
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011008    .6342858   .0048318   2.658036
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274329    .0799488  -.3350334   -.000609
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062697    .3730565          0   58.23837
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697173           0   1.697173   1.697173
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265402           0   .0265402   .0265402
{txt}{space 4}E_mean_R {c |}{res}     27,920      .09599           0     .09599     .09599
3.63325
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39850.18           0   39850.18   39850.18
{txt}{space 4}E_mean_R {c |}{res}     27,920      .09599           0     .09599     .09599
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265402           0   .0265402   .0265402
{txt}{space 5}V_sum_R {c |}{res}     27,920     5421.55           0    5421.55    5421.55
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360483           0   .1360483   .1360483
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5022.934           0  -5022.934  -5022.934
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120991           0  -.0120991  -.0120991
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697173           0   1.697173   1.697173
{txt}{hline 13}{c +}{hline 57}
restricted~7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011009    .6342858   .0048327   2.658037
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274331    .0799488  -.3350335  -.0006092
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062698    .3730578          0   58.23852
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697162           0   1.697162   1.697162
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265404           0   .0265404   .0265404
{txt}{space 4}E_mean_R {c |}{res}     27,920     .095991           0    .095991    .095991
3.633251
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39850.57           0   39850.57   39850.57
{txt}{space 4}E_mean_R {c |}{res}     27,920     .095991           0    .095991    .095991
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265404           0   .0265404   .0265404
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.587           0   5421.587   5421.587
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360479           0   .1360479   .1360479
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5022.986           0  -5022.986  -5022.986
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120992           0  -.0120992  -.0120992
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697162           0   1.697162   1.697162
{txt}{hline 13}{c +}{hline 57}
restrict~1_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920     1.01101    .6342858   .0048337   2.658038
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274332    .0799488  -.3350337  -.0006093
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062698    .3730591          0   58.23867
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697151           0   1.697151   1.697151
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265406           0   .0265406   .0265406
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959919           0   .0959919   .0959919
3.633252
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39850.97           0   39850.97   39850.97
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959919           0   .0959919   .0959919
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265406           0   .0265406   .0265406
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.626           0   5421.626   5421.626
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360475           0   .1360475   .1360475
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.039           0  -5023.039  -5023.039
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120994           0  -.0120994  -.0120994
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697151           0   1.697151   1.697151
{txt}{hline 13}{c +}{hline 57}
restrict~2_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011011    .6342858   .0048349   2.658039
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274333    .0799488  -.3350338  -.0006094
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062698    .3730603          0   58.23882
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697137           0   1.697137   1.697137
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265408           0   .0265408   .0265408
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959931           0   .0959931   .0959931
3.633253
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39851.46           0   39851.46   39851.46
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959931           0   .0959931   .0959931
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265408           0   .0265408   .0265408
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.671           0   5421.671   5421.671
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920     .136047           0    .136047    .136047
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.091           0  -5023.091  -5023.091
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120995           0  -.0120995  -.0120995
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697137           0   1.697137   1.697137
{txt}{hline 13}{c +}{hline 57}
restrict~3_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011012    .6342858   .0048358   2.658041
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274334    .0799488  -.3350339  -.0006095
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062699    .3730616          0   58.23897
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697127           0   1.697127   1.697127
{txt}{space 4}D_mean_R {c |}{res}     27,920     .026541           0    .026541    .026541
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959941           0   .0959941   .0959941
3.633254
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39851.86           0   39851.86   39851.86
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959941           0   .0959941   .0959941
{txt}{space 4}D_mean_R {c |}{res}     27,920     .026541           0    .026541    .026541
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.709           0   5421.709   5421.709
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360466           0   .1360466   .1360466
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.143           0  -5023.143  -5023.143
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120996           0  -.0120996  -.0120996
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697127           0   1.697127   1.697127
{txt}{hline 13}{c +}{hline 57}
restrict~4_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011013    .6342858   .0048368   2.658041
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274336    .0799488   -.335034  -.0006097
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062699    .3730629          0   58.23912
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697116           0   1.697116   1.697116
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265412           0   .0265412   .0265412
{txt}{space 4}E_mean_R {c |}{res}     27,920     .095995           0    .095995    .095995
3.633255
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39852.25           0   39852.25   39852.25
{txt}{space 4}E_mean_R {c |}{res}     27,920     .095995           0    .095995    .095995
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265412           0   .0265412   .0265412
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.746           0   5421.746   5421.746
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360462           0   .1360462   .1360462
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.195           0  -5023.195  -5023.195
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120997           0  -.0120997  -.0120997
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697116           0   1.697116   1.697116
{txt}{hline 13}{c +}{hline 57}
restrict~5_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011014    .6342858   .0048378   2.658042
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274337    .0799488  -.3350342  -.0006098
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920      .00627    .3730641          0   58.23927
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697104           0   1.697104   1.697104
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265414           0   .0265414   .0265414
{txt}{space 4}E_mean_R {c |}{res}     27,920     .095996           0    .095996    .095996
3.633256
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39852.65           0   39852.65   39852.65
{txt}{space 4}E_mean_R {c |}{res}     27,920     .095996           0    .095996    .095996
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265414           0   .0265414   .0265414
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.784           0   5421.784   5421.784
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360457           0   .1360457   .1360457
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.248           0  -5023.248  -5023.248
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0120999           0  -.0120999  -.0120999
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697104           0   1.697104   1.697104
{txt}{hline 13}{c +}{hline 57}
restrict~6_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011015    .6342858   .0048387   2.658043
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274338    .0799488  -.3350343  -.0006099
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920      .00627    .3730654          0   58.23943
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697093           0   1.697093   1.697093
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265415           0   .0265415   .0265415
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959969           0   .0959969   .0959969
3.633257
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39853.05           0   39853.05   39853.05
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959969           0   .0959969   .0959969
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265415           0   .0265415   .0265415
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.821           0   5421.821   5421.821
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360453           0   .1360453   .1360453
{txt}{space 5}a_sum_R {c |}{res}     27,920     -5023.3           0    -5023.3    -5023.3
{txt}{space 4}a_mean_R {c |}{res}     27,920      -.0121           0     -.0121     -.0121
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697093           0   1.697093   1.697093
{txt}{hline 13}{c +}{hline 57}
restrict~7_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011016    .6342857   .0048399   2.658044
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274339    .0799488  -.3350344    -.00061
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062701    .3730667          0   58.23958
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697079           0   1.697079   1.697079
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265418           0   .0265418   .0265418
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959981           0   .0959981   .0959981
3.633258
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39853.54           0   39853.54   39853.54
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959981           0   .0959981   .0959981
{txt}{space 4}D_mean_R {c |}{res}     27,920    .0265418           0   .0265418   .0265418
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.864           0   5421.864   5421.864
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360448           0   .1360448   .1360448
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.353           0  -5023.353  -5023.353
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0121001           0  -.0121001  -.0121001
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697079           0   1.697079   1.697079
{txt}{hline 13}{c +}{hline 57}
restrict~8_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}(27,920 real changes made)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     27,920    1.011017    .6342858   .0048409   2.658046
{txt}{space 7}a_gap {c |}{res}     27,920   -.1274341    .0799488  -.3350345  -.0006102
{txt}(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)
(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     27,920    .0062701     .373068          0   58.23973
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     27,920    1.697069           0   1.697069   1.697069
{txt}{space 4}D_mean_R {c |}{res}     27,920     .026542           0    .026542    .026542
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959991           0   .0959991   .0959991
3.633259
{txt}(11,680 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     27,920    415149.2           0   415149.2   415149.2
{txt}{space 5}E_sum_R {c |}{res}     27,920    39853.94           0   39853.94   39853.94
{txt}{space 4}E_mean_R {c |}{res}     27,920    .0959991           0   .0959991   .0959991
{txt}{space 4}D_mean_R {c |}{res}     27,920     .026542           0    .026542    .026542
{txt}{space 5}V_sum_R {c |}{res}     27,920    5421.905           0   5421.905   5421.905
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     27,920    .1360444           0   .1360444   .1360444
{txt}{space 5}a_sum_R {c |}{res}     27,920   -5023.405           0  -5023.405  -5023.405
{txt}{space 4}a_mean_R {c |}{res}     27,920   -.0121002           0  -.0121002  -.0121002
{txt}{space 3}DA_mean_R {c |}{res}     27,920    .0004217           0   .0004217   .0004217
{txt}{space 8}cv_R {c |}{res}     27,920    1.697069           0   1.697069   1.697069
{txt}{hline 13}{c +}{hline 57}
restrict~9_7 {c |}{res}     39,600    .7050505    .4560258          0          1
{txt}
{com}. 
. * restore  
. 
.         *****************************************************
.         **                              Simulation over sigma and kappa    **
.         *****************************************************
.         
.                 ** Note: each case is based on a set sigma, the corresponding kappa is narrowed down iteratively first to arrive at a small range displayed here 
.         
.                 **** case 1 ****
. scalar sigma = 0.031 // initial: 3.8330
{txt}
{com}. scalar case = 1
{txt}
{com}. 
. forvalues i = 3832930(1)3832939 {c -(}       
{txt}  2{com}.         
.         scalar kappa = `i'/1000000
{txt}  3{com}.         local k = kappa
{txt}  4{com}.         local j = case // first column in table  
{txt}  5{com}.         
.                 *** drop variables from previous loop 
.         drop e_gap-U_ratio // reset to overwrite 
{txt}  6{com}.         
.         gen restricted_`i'_`j' = 0 
{txt}  7{com}.         replace restricted_`i'_`j' = 1 if e_0 < kappa - sigma*a_0 - tolerance
{txt}  8{com}. 
.         
.         **** 
.         *****************************************************
.         *****************************************************
.         *** 2) predicted adjustment 
. 
. 
.         gen e_gap =     ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma) // 
{txt}  9{com}.         
.         gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )
{txt} 10{com}. 
.         gen  e_star =   e_gap + e_0                                     // now what to do with e vs. E 
{txt} 11{com}. 
.         gen  a_star =   a_gap + a_0                                     // flawless. tell 'em?   
{txt} 12{com}. 
.  
.         *****************************************************
.         *****************************************************
.         *** 3) evaluate Delta V. 
. 
.         gen  V_gap = 0.5*(1-gamma^2)/(1-2*sigma*gamma+sigma^2)*(e_star - e_0)^2  // 
{txt} 13{com}.         
.         ** test 
. 
.         gen  E_star = E_bar - e_star  
{txt} 14{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 4.a) sum up weights (i.e. sales volume)
.         
.         sort year restricted_`i'_`j' 
{txt} 15{com}.         
.         by year, sort: egen w_sum_T =sum(cell_year_sales)  // 
{txt} 16{com}. 
.         by year restricted_`i'_`j', sort: egen w_sum_R =sum(cell_year_sales) if restricted_`i'_`j'== 1 // by year
{txt} 17{com}. 
.         gen R_ratio = w_sum_R/w_sum_T
{txt} 18{com}. 
.         by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt} 19{com}. 
.         by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
{txt} 20{com}.         
.         gen P_ratio = p_sum_R/p_sum_T
{txt} 21{com}. 
.         *by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
.         
. 
.         *****************************************************
.         *****************************************************
.         *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
.         gen V_sum_cell = V_gap*cell_year_sales 
{txt} 22{com}. 
.         *** aggregate 
.         
.         sort year restricted_`i'_`j' 
{txt} 23{com}. 
.         by year restricted_`i'_`j', sort: egen V_sum_R =sum(V_sum_cell) if restricted_`i'_`j' == 1 // by year
{txt} 24{com}. 
.         /* 
>         sum V_gap if restricted_`i'_`j' == 1 & year == 2011 //  
> 
>         sum V_gap V_sum_cell V_sum_R if restricted_`i'_`j' == 1 & year == 2011 
> 
>         codebook V_sum_R // 
> 
>         tab cell a_bin if V_gap < 0 & restricted_`i'_`j' == 1 & year == 2011 //  
>  
>         */ 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.a) sum up changes in E  and a 
.         
.         gen E_gap = e_star - e_0 
{txt} 25{com}. 
.         sum E_gap a_gap if restricted_`i'_`j' == 1 & year == 2011 
{txt} 26{com}. 
.         gen E_gap_cell = E_gap*cell_year_sales 
{txt} 27{com}. 
.         sort year restricted_`i'_`j' 
{txt} 28{com}. 
.         by year restricted_`i'_`j', sort: egen E_sum_R =sum(E_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 29{com}. 
.         gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 30{com}.                 
.         gen a_gap_cell = a_gap*cell_year_sales 
{txt} 31{com}.                 
.         sort year restricted_`i'_`j' 
{txt} 32{com}. 
.         by year restricted_`i'_`j', sort: egen a_sum_R =sum(a_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 33{com}. 
.         gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 34{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
.         gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations 
{txt} 35{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 36{com}. 
.         by year restricted_`i'_`j', sort: egen D_sum_R =sum(D_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 37{com}. 
.         *** mean of the above. 
.         gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt} 38{com}. 
.  
.         sum D_sum_cell D_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 39{com}. 
.         *** repeat for a // zero for ABR, < 0 for flat regulations 
.         
.         gen DA_sum_cell = cell_year_sales*(a_gap)^2 // squared sum of deviations 
{txt} 40{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 41{com}. 
.         by year restricted_`i'_`j', sort: egen DA_sum_R =sum(DA_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 42{com}. 
.         *** mean of the above. 
.         gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt} 43{com}. 
.  
.         sum DA_sum_cell DA_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 44{com}. 
.         *****************************************************
.         *****************************************************
.         *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
.         gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt} 45{com}. 
. 
.         sum cv_R D_mean_R E_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 46{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 6) utility ratio  
.         display kappa 
{txt} 47{com}. 
.         gen U_ratio = V_sum_R / E_sum_R 
{txt} 48{com}.         
.         sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted_`i'_`j' if year == 2011 //  
{txt} 49{com}.         
.         quietly gen w_sum_R_`i' = w_sum_R
{txt} 50{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt} 51{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt} 52{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt} 53{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt} 54{com}.         quietly gen U_ratio_`i' = U_ratio
{txt} 55{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt} 56{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt} 57{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt} 58{com}.         quietly gen cv_R_`i' = cv_R
{txt} 59{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt} 60{com}.         quietly gen a_gap_`i' = a_gap
{txt} 61{com}.         quietly gen V_gap_`i' = V_gap 
{txt} 62{com}.         quietly gen restricted_`i' = restricted_`i'_`j'
{txt} 63{com}. * restore       
.         
. {c )-}
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522671    .5804522   .0063715   2.399815
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908637    .0553858  -.2289862   -.000608
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093522    24.94134          0   3819.029
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268095           0   .0268095   .0268095
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752     .003727    .2270822          0   34.77092
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678288           0   1.678288   1.678288
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268095           0   .0268095   .0268095
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975614           0   .0975614   .0975614
3.83293
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39851.31           0   39851.31   39851.31
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975614           0   .0975614   .0975614
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268095           0   .0268095   .0268095
{txt}{space 5}V_sum_R {c |}{res}     26,752     5425.69           0    5425.69    5425.69
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361484           0   .1361484   .1361484
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.544           0  -3802.544  -3802.544
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093091           0  -.0093091  -.0093091
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678288           0   1.678288   1.678288
{txt}{hline 13}{c +}{hline 57}
restrict~0_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522681    .5804522   .0063727   2.399816
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908638    .0553858  -.2289863  -.0006081
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093553    24.94142          0   3819.038
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268097           0   .0268097   .0268097
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752     .003727     .227083          0   34.77101
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678277           0   1.678277   1.678277
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268097           0   .0268097   .0268097
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975624           0   .0975624   .0975624
3.832931
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39851.71           0   39851.71   39851.71
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975624           0   .0975624   .0975624
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268097           0   .0268097   .0268097
{txt}{space 5}V_sum_R {c |}{res}     26,752     5425.73           0    5425.73    5425.73
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752     .136148           0    .136148    .136148
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.583           0  -3802.583  -3802.583
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093092           0  -.0093092  -.0093092
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678277           0   1.678277   1.678277
{txt}{hline 13}{c +}{hline 57}
restrict~1_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522691    .5804522   .0063736   2.399817
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908639    .0553858  -.2289864  -.0006082
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093583     24.9415          0   3819.047
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268099           0   .0268099   .0268099
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037271    .2270837          0    34.7711
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678265           0   1.678265   1.678265
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268099           0   .0268099   .0268099
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975634           0   .0975634   .0975634
3.832932
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39852.14           0   39852.14   39852.14
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975634           0   .0975634   .0975634
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268099           0   .0268099   .0268099
{txt}{space 5}V_sum_R {c |}{res}     26,752    5425.771           0   5425.771   5425.771
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361475           0   .1361475   .1361475
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.622           0  -3802.622  -3802.622
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093093           0  -.0093093  -.0093093
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678265           0   1.678265   1.678265
{txt}{hline 13}{c +}{hline 57}
restrict~2_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522701    .5804522   .0063746   2.399818
{txt}{space 7}a_gap {c |}{res}     26,752    -.090864    .0553858  -.2289865  -.0006083
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093612    24.94158          0   3819.056
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268101           0   .0268101   .0268101
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037271    .2270845          0   34.77119
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678255           0   1.678255   1.678255
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268101           0   .0268101   .0268101
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975644           0   .0975644   .0975644
3.832933
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39852.54           0   39852.54   39852.54
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975644           0   .0975644   .0975644
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268101           0   .0268101   .0268101
{txt}{space 5}V_sum_R {c |}{res}     26,752     5425.81           0    5425.81    5425.81
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361472           0   .1361472   .1361472
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.661           0  -3802.661  -3802.661
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093094           0  -.0093094  -.0093094
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678255           0   1.678255   1.678255
{txt}{hline 13}{c +}{hline 57}
restrict~3_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522711    .5804522   .0063756   2.399819
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908641    .0553858  -.2289866  -.0006083
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093642    24.94167          0   3819.068
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268103           0   .0268103   .0268103
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037271    .2270852          0   34.77127
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678244           0   1.678244   1.678244
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268103           0   .0268103   .0268103
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975653           0   .0975653   .0975653
3.832934
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39852.94           0   39852.94   39852.94
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975653           0   .0975653   .0975653
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268103           0   .0268103   .0268103
{txt}{space 5}V_sum_R {c |}{res}     26,752     5425.85           0    5425.85    5425.85
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361468           0   .1361468   .1361468
{txt}{space 5}a_sum_R {c |}{res}     26,752     -3802.7           0    -3802.7    -3802.7
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093095           0  -.0093095  -.0093095
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678244           0   1.678244   1.678244
{txt}{hline 13}{c +}{hline 57}
restrict~4_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522721    .5804522   .0063765    2.39982
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908642    .0553858  -.2289867  -.0006084
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093672    24.94175          0   3819.077
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268105           0   .0268105   .0268105
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037271    .2270859          0   34.77136
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678233           0   1.678233   1.678233
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268105           0   .0268105   .0268105
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975664           0   .0975664   .0975664
3.832935
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39853.36           0   39853.36   39853.36
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975664           0   .0975664   .0975664
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268105           0   .0268105   .0268105
{txt}{space 5}V_sum_R {c |}{res}     26,752    5425.889           0   5425.889   5425.889
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361464           0   .1361464   .1361464
{txt}{space 5}a_sum_R {c |}{res}     26,752    -3802.74           0   -3802.74   -3802.74
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093096           0  -.0093096  -.0093096
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678233           0   1.678233   1.678233
{txt}{hline 13}{c +}{hline 57}
restrict~5_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522731    .5804522   .0063777   2.399821
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908643    .0553858  -.2289868  -.0006085
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093703    24.94183          0   3819.086
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268107           0   .0268107   .0268107
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037272    .2270867          0   34.77145
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678221           0   1.678221   1.678221
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268107           0   .0268107   .0268107
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975674           0   .0975674   .0975674
3.832936
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39853.77           0   39853.77   39853.77
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975674           0   .0975674   .0975674
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268107           0   .0268107   .0268107
{txt}{space 5}V_sum_R {c |}{res}     26,752     5425.93           0    5425.93    5425.93
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361459           0   .1361459   .1361459
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.779           0  -3802.779  -3802.779
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093097           0  -.0093097  -.0093097
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678221           0   1.678221   1.678221
{txt}{hline 13}{c +}{hline 57}
restrict~6_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522741    .5804522   .0063787   2.399822
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908644    .0553858  -.2289869  -.0006086
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093732    24.94191          0   3819.095
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268109           0   .0268109   .0268109
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037272    .2270874          0   34.77154
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752     1.67821           0    1.67821    1.67821
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268109           0   .0268109   .0268109
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975684           0   .0975684   .0975684
3.832937
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39854.19           0   39854.19   39854.19
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975684           0   .0975684   .0975684
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268109           0   .0268109   .0268109
{txt}{space 5}V_sum_R {c |}{res}     26,752    5425.969           0   5425.969   5425.969
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361455           0   .1361455   .1361455
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.818           0  -3802.818  -3802.818
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093098           0  -.0093098  -.0093098
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752     1.67821           0    1.67821    1.67821
{txt}{hline 13}{c +}{hline 57}
restrict~7_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522751    .5804522   .0063796   2.399823
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908645    .0553858   -.228987  -.0006087
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093762      24.942          0   3819.107
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268111           0   .0268111   .0268111
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037272    .2270882          0   34.77163
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678199           0   1.678199   1.678199
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268111           0   .0268111   .0268111
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975694           0   .0975694   .0975694
3.832938
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39854.59           0   39854.59   39854.59
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975694           0   .0975694   .0975694
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268111           0   .0268111   .0268111
{txt}{space 5}V_sum_R {c |}{res}     26,752    5426.009           0   5426.009   5426.009
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361452           0   .1361452   .1361452
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.857           0  -3802.857  -3802.857
{txt}{space 4}a_mean_R {c |}{res}     26,752   -.0093099           0  -.0093099  -.0093099
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678199           0   1.678199   1.678199
{txt}{hline 13}{c +}{hline 57}
restrict~8_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}(26,752 real changes made)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     26,752    .9522761    .5804522   .0063806   2.399824
{txt}{space 7}a_gap {c |}{res}     26,752   -.0908646    .0553858  -.2289871  -.0006088
{txt}(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     26,752    .4093791    24.94208          0   3819.116
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268113           0   .0268113   .0268113
{txt}(12,848 missing values generated)
(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     26,752    .0037273    .2270889          0   34.77171
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     26,752    1.678189           0   1.678189   1.678189
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268113           0   .0268113   .0268113
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975703           0   .0975703   .0975703
3.832939
{txt}(12,848 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     26,752    408474.3           0   408474.3   408474.3
{txt}{space 5}E_sum_R {c |}{res}     26,752    39854.98           0   39854.98   39854.98
{txt}{space 4}E_mean_R {c |}{res}     26,752    .0975703           0   .0975703   .0975703
{txt}{space 4}D_mean_R {c |}{res}     26,752    .0268113           0   .0268113   .0268113
{txt}{space 5}V_sum_R {c |}{res}     26,752    5426.047           0   5426.047   5426.047
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     26,752    .1361448           0   .1361448   .1361448
{txt}{space 5}a_sum_R {c |}{res}     26,752   -3802.896           0  -3802.896  -3802.896
{txt}{space 4}a_mean_R {c |}{res}     26,752     -.00931           0    -.00931    -.00931
{txt}{space 3}DA_mean_R {c |}{res}     26,752    .0002441           0   .0002441   .0002441
{txt}{space 8}cv_R {c |}{res}     26,752    1.678189           0   1.678189   1.678189
{txt}{hline 13}{c +}{hline 57}
restrict~9_1 {c |}{res}     39,600    .6755556    .4681728          0          1
{txt}
{com}. 
.                 **** case 2 ****
. scalar sigma = 0.063
{txt}
{com}. scalar case = 2
{txt}
{com}. 
. forvalues i = 4033760(1)4033769 {c -(}       
{txt}  2{com}.         
.         scalar kappa = `i'/1000000
{txt}  3{com}.         local k = kappa
{txt}  4{com}.         local j = case // first column in table  
{txt}  5{com}.         
.                 *** drop variables from previous loop 
.         drop e_gap-U_ratio // reset to overwrite 
{txt}  6{com}.         
.         gen restricted_`i'_`j' = 0 
{txt}  7{com}.         replace restricted_`i'_`j' = 1 if e_0 < kappa - sigma*a_0 - tolerance
{txt}  8{com}. 
.         
.         **** 
.         *****************************************************
.         *****************************************************
.         *** 2) predicted adjustment 
. 
. 
.         gen e_gap =     ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma) // equivalent to E_gap. 
{txt}  9{com}.         
.         gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )
{txt} 10{com}. 
.         gen  e_star =   e_gap + e_0                                     // 
{txt} 11{com}. 
.         gen  a_star =   a_gap + a_0                                     //    
{txt} 12{com}. 
.  
.         *****************************************************
.         *****************************************************
.         *** 3) evaluate Delta V. 
. 
.         gen  V_gap = 0.5*(1-gamma^2)/(1-2*sigma*gamma+sigma^2)*(e_star - e_0)^2  //  
{txt} 13{com}.         
.         ** test 
. 
.         gen  E_star = E_bar - e_star  
{txt} 14{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 4.a) sum up weights (i.e. sales volume)
. 
.         sort year restricted_`i'_`j' 
{txt} 15{com}.         
.         by year, sort: egen w_sum_T =sum(cell_year_sales)  //  
{txt} 16{com}. 
.         by year restricted_`i'_`j', sort: egen w_sum_R =sum(cell_year_sales) if restricted_`i'_`j'== 1 // by year
{txt} 17{com}. 
.         gen R_ratio = w_sum_R/w_sum_T
{txt} 18{com}. 
.         by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt} 19{com}. 
.         by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
{txt} 20{com}.         
.         gen P_ratio = p_sum_R/p_sum_T
{txt} 21{com}. 
.         *by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
.         
. 
.         *****************************************************
.         *****************************************************
.         *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
.         gen V_sum_cell = V_gap*cell_year_sales 
{txt} 22{com}. 
.         *** aggregate 
.         
.         sort year restricted_`i'_`j' 
{txt} 23{com}. 
.         by year restricted_`i'_`j', sort: egen V_sum_R =sum(V_sum_cell) if restricted_`i'_`j' == 1 // by year
{txt} 24{com}. 
.  
.         /* 
>         sum V_gap if restricted_`i'_`j' == 1 & year == 2011 //  
> 
>         sum V_gap V_sum_cell V_sum_R if restricted_`i'_`j' == 1 & year == 2011 
> 
>         codebook V_sum_R // 
> 
>         tab cell a_bin if V_gap < 0 & restricted_`i'_`j' == 1 & year == 2011 //  
>  
>         */ 
.  
.         *****************************************************
.         *****************************************************
.         *** 5.a) sum up changes in E  and a 
.         
.         gen E_gap = e_star - e_0 
{txt} 25{com}. 
.         sum E_gap a_gap if restricted_`i'_`j' == 1 & year == 2011 // E_gap must be positive. E_0 > E*. 
{txt} 26{com}. 
.         gen E_gap_cell = E_gap*cell_year_sales 
{txt} 27{com}. 
.         sort year restricted_`i'_`j' 
{txt} 28{com}. 
.         by year restricted_`i'_`j', sort: egen E_sum_R =sum(E_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 29{com}. 
.         gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 30{com}. 
.         gen a_gap_cell = a_gap*cell_year_sales 
{txt} 31{com}.                 
.         sort year restricted_`i'_`j' 
{txt} 32{com}. 
.         by year restricted_`i'_`j', sort: egen a_sum_R =sum(a_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 33{com}. 
.         gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 34{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
.         gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations
{txt} 35{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 36{com}. 
.         by year restricted_`i'_`j', sort: egen D_sum_R =sum(D_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 37{com}. 
.         *** mean of the above. 
.         gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt} 38{com}. 
.  
.         sum D_sum_cell D_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 39{com}. 
.         *** repeat for a // 
.         
.         gen DA_sum_cell = cell_year_sales*(a_gap)^2 // squared sum of deviations 
{txt} 40{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 41{com}. 
.         by year restricted_`i'_`j', sort: egen DA_sum_R =sum(DA_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 42{com}. 
.         *** mean of the above. 
.         gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt} 43{com}. 
.  
.         sum DA_sum_cell DA_mean_R if restricted_`i'_`j' == 1 & year == 2011 //  
{txt} 44{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
.         gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt} 45{com}. 
. 
.         sum cv_R D_mean_R E_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 46{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 6) utility ratio  
.         display kappa 
{txt} 47{com}. 
.         gen U_ratio = V_sum_R / E_sum_R 
{txt} 48{com}.         
.         sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted_`i'_`j' if year == 2011 // 
{txt} 49{com}.         
.         quietly gen w_sum_R_`i' = w_sum_R
{txt} 50{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt} 51{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt} 52{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt} 53{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt} 54{com}.         quietly gen U_ratio_`i' = U_ratio
{txt} 55{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt} 56{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt} 57{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt} 58{com}.         quietly gen cv_R_`i' = cv_R
{txt} 59{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt} 60{com}.         quietly gen a_gap_`i' = a_gap
{txt} 61{com}.         quietly gen V_gap_`i' = V_gap 
{txt} 62{com}.         quietly gen restricted_`i' = restricted_`i'_`j'
{txt} 63{com}. * restore       
.         
. {c )-}
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891615    .5286956   .0050666   2.122042
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566622    .0335987   -.134856   -.000322
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488     .428967    26.31885          0   3913.378
{txt}{space 4}D_mean_R {c |}{res}     25,488     .025915           0    .025915    .025915
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017324    .1062917          0   15.80462
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704409           0   1.704409   1.704409
{txt}{space 4}D_mean_R {c |}{res}     25,488     .025915           0    .025915    .025915
{txt}{space 4}E_mean_R {c |}{res}     25,488      .09445           0     .09445     .09445
4.03376
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39848.34           0   39848.34   39848.34
{txt}{space 4}E_mean_R {c |}{res}     25,488      .09445           0     .09445     .09445
{txt}{space 4}D_mean_R {c |}{res}     25,488     .025915           0    .025915    .025915
{txt}{space 5}V_sum_R {c |}{res}     25,488    5444.764           0   5444.764   5444.764
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366372           0   .1366372   .1366372
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.365           0  -2532.365  -2532.365
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060023           0  -.0060023  -.0060023
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704409           0   1.704409   1.704409
{txt}{hline 13}{c +}{hline 57}
restricte~_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891616    .5286956   .0050676   2.122043
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566623    .0335987  -.1348561   -.000322
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289701    26.31893          0   3913.387
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259152           0   .0259152   .0259152
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017324     .106292          0   15.80466
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704397           0   1.704397   1.704397
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259152           0   .0259152   .0259152
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094451           0    .094451    .094451
4.033761
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39848.76           0   39848.76   39848.76
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094451           0    .094451    .094451
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259152           0   .0259152   .0259152
{txt}{space 5}V_sum_R {c |}{res}     25,488    5444.804           0   5444.804   5444.804
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366367           0   .1366367   .1366367
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.392           0  -2532.392  -2532.392
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060024           0  -.0060024  -.0060024
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704397           0   1.704397   1.704397
{txt}{hline 13}{c +}{hline 57}
restrict~1_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891617    .5286956   .0050685   2.122044
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566623    .0335987  -.1348561  -.0003221
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289732    26.31901          0   3913.396
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259154           0   .0259154   .0259154
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325    .1062923          0    15.8047
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704385           0   1.704385   1.704385
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259154           0   .0259154   .0259154
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094452           0    .094452    .094452
4.033762
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39849.18           0   39849.18   39849.18
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094452           0    .094452    .094452
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259154           0   .0259154   .0259154
{txt}{space 5}V_sum_R {c |}{res}     25,488    5444.843           0   5444.843   5444.843
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366363           0   .1366363   .1366363
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.419           0  -2532.419  -2532.419
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060024           0  -.0060024  -.0060024
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704385           0   1.704385   1.704385
{txt}{hline 13}{c +}{hline 57}
restrict~2_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891618    .5286956   .0050695   2.122045
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566624    .0335987  -.1348562  -.0003222
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289763    26.31909          0   3913.406
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259156           0   .0259156   .0259156
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325    .1062927          0   15.80474
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704374           0   1.704374   1.704374
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259156           0   .0259156   .0259156
{txt}{space 4}E_mean_R {c |}{res}     25,488    .0944529           0   .0944529   .0944529
4.033763
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39849.59           0   39849.59   39849.59
{txt}{space 4}E_mean_R {c |}{res}     25,488    .0944529           0   .0944529   .0944529
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259156           0   .0259156   .0259156
{txt}{space 5}V_sum_R {c |}{res}     25,488    5444.882           0   5444.882   5444.882
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366358           0   .1366358   .1366358
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.446           0  -2532.446  -2532.446
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060025           0  -.0060025  -.0060025
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704374           0   1.704374   1.704374
{txt}{hline 13}{c +}{hline 57}
restrict~3_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891619    .5286956   .0050707   2.122046
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566625    .0335987  -.1348563  -.0003222
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289794    26.31917          0   3913.415
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259158           0   .0259158   .0259158
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325     .106293          0   15.80478
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704361           0   1.704361   1.704361
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259158           0   .0259158   .0259158
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094454           0    .094454    .094454
4.033764
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39850.03           0   39850.03   39850.03
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094454           0    .094454    .094454
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259158           0   .0259158   .0259158
{txt}{space 5}V_sum_R {c |}{res}     25,488    5444.922           0   5444.922   5444.922
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366353           0   .1366353   .1366353
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.473           0  -2532.473  -2532.473
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060026           0  -.0060026  -.0060026
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704361           0   1.704361   1.704361
{txt}{hline 13}{c +}{hline 57}
restrict~4_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488      .89162    .5286956   .0050716   2.122047
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566625    .0335987  -.1348563  -.0003223
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289826    26.31927          0   3913.427
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259159           0   .0259159   .0259159
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325    .1062934          0   15.80482
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704349           0   1.704349   1.704349
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259159           0   .0259159   .0259159
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094455           0    .094455    .094455
4.033765
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39850.46           0   39850.46   39850.46
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094455           0    .094455    .094455
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259159           0   .0259159   .0259159
{txt}{space 5}V_sum_R {c |}{res}     25,488    5444.963           0   5444.963   5444.963
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366349           0   .1366349   .1366349
{txt}{space 5}a_sum_R {c |}{res}     25,488     -2532.5           0    -2532.5    -2532.5
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060026           0  -.0060026  -.0060026
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704349           0   1.704349   1.704349
{txt}{hline 13}{c +}{hline 57}
restrict~5_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891621    .5286956   .0050726   2.122048
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566626    .0335987  -.1348564  -.0003224
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289857    26.31935          0   3913.436
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259161           0   .0259161   .0259161
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325    .1062937          0   15.80486
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704338           0   1.704338   1.704338
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259161           0   .0259161   .0259161
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094456           0    .094456    .094456
4.033766
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39850.88           0   39850.88   39850.88
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094456           0    .094456    .094456
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259161           0   .0259161   .0259161
{txt}{space 5}V_sum_R {c |}{res}     25,488    5445.002           0   5445.002   5445.002
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366345           0   .1366345   .1366345
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.527           0  -2532.527  -2532.527
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060027           0  -.0060027  -.0060027
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704338           0   1.704338   1.704338
{txt}{hline 13}{c +}{hline 57}
restrict~6_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891622    .5286956   .0050735   2.122049
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566627    .0335987  -.1348564  -.0003224
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289889    26.31943          0   3913.446
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259163           0   .0259163   .0259163
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325     .106294          0    15.8049
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704326           0   1.704326   1.704326
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259163           0   .0259163   .0259163
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094457           0    .094457    .094457
4.033767
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39851.29           0   39851.29   39851.29
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094457           0    .094457    .094457
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259163           0   .0259163   .0259163
{txt}{space 5}V_sum_R {c |}{res}     25,488    5445.042           0   5445.042   5445.042
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488     .136634           0    .136634    .136634
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.554           0  -2532.554  -2532.554
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060028           0  -.0060028  -.0060028
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704326           0   1.704326   1.704326
{txt}{hline 13}{c +}{hline 57}
restrict~7_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891623    .5286956   .0050745    2.12205
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566627    .0335987  -.1348565  -.0003225
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488     .428992    26.31952          0   3913.457
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259165           0   .0259165   .0259165
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325    .1062944          0   15.80494
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704314           0   1.704314   1.704314
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259165           0   .0259165   .0259165
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094458           0    .094458    .094458
4.033768
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39851.71           0   39851.71   39851.71
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094458           0    .094458    .094458
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259165           0   .0259165   .0259165
{txt}{space 5}V_sum_R {c |}{res}     25,488    5445.083           0   5445.083   5445.083
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366336           0   .1366336   .1366336
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.581           0  -2532.581  -2532.581
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060028           0  -.0060028  -.0060028
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704314           0   1.704314   1.704314
{txt}{hline 13}{c +}{hline 57}
restrict~8_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}(25,488 real changes made)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     25,488     .891624    .5286956   .0050757   2.122051
{txt}{space 7}a_gap {c |}{res}     25,488   -.0566628    .0335987  -.1348566  -.0003226
{txt}(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     25,488    .4289952     26.3196          0   3913.467
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259167           0   .0259167   .0259167
{txt}(14,112 missing values generated)
(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     25,488    .0017325    .1062947          0   15.80498
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     25,488    1.704302           0   1.704302   1.704302
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259167           0   .0259167   .0259167
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094459           0    .094459    .094459
4.033769
{txt}(14,112 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     25,488    421898.9           0   421898.9   421898.9
{txt}{space 5}E_sum_R {c |}{res}     25,488    39852.14           0   39852.14   39852.14
{txt}{space 4}E_mean_R {c |}{res}     25,488     .094459           0    .094459    .094459
{txt}{space 4}D_mean_R {c |}{res}     25,488    .0259167           0   .0259167   .0259167
{txt}{space 5}V_sum_R {c |}{res}     25,488    5445.122           0   5445.122   5445.122
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     25,488    .1366331           0   .1366331   .1366331
{txt}{space 5}a_sum_R {c |}{res}     25,488   -2532.608           0  -2532.608  -2532.608
{txt}{space 4}a_mean_R {c |}{res}     25,488   -.0060029           0  -.0060029  -.0060029
{txt}{space 3}DA_mean_R {c |}{res}     25,488    .0001047           0   .0001047   .0001047
{txt}{space 8}cv_R {c |}{res}     25,488    1.704302           0   1.704302   1.704302
{txt}{hline 13}{c +}{hline 57}
restrict~9_2 {c |}{res}     39,600    .6436364    .4789305          0          1
{txt}
{com}. 
.                 **** case 3 ****
. scalar sigma = 0.094
{txt}
{com}. scalar case = 3
{txt}
{com}. 
. forvalues i = 4219190(1)4219199 {c -(}       
{txt}  2{com}.         
.         scalar kappa = `i'/1000000
{txt}  3{com}.         local k = kappa
{txt}  4{com}.         local j = case // first column in table  
{txt}  5{com}.         
.                 *** drop variables from previous loop 
.         drop e_gap-U_ratio // reset to overwrite 
{txt}  6{com}.         
.         gen restricted_`i'_`j' = 0 
{txt}  7{com}.         replace restricted_`i'_`j' = 1 if e_0 < kappa - sigma*a_0 - tolerance
{txt}  8{com}. 
.         
.         **** 
.         *****************************************************
.         *****************************************************
.         *** 2) predicted adjustment 
. 
. 
.         gen e_gap =     ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma) // equivalent to E_gap. 
{txt}  9{com}.         
.         gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )
{txt} 10{com}. 
.         gen  e_star =   e_gap + e_0                                     // 
{txt} 11{com}. 
.         gen  a_star =   a_gap + a_0                                     //    
{txt} 12{com}. 
.  
.         *****************************************************
.         *****************************************************
.         *** 3) evaluate Delta V. 
. 
.         gen  V_gap = 0.5*(1-gamma^2)/(1-2*sigma*gamma+sigma^2)*(e_star - e_0)^2  // careful: general formula needed. 
{txt} 13{com}.         
.         ** test 
. 
.         gen  E_star = E_bar - e_star  
{txt} 14{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 4.a) sum up weights (i.e. sales volume)
. 
.         
.         sort year restricted_`i'_`j' 
{txt} 15{com}.         
.         by year, sort: egen w_sum_T =sum(cell_year_sales)  // 
{txt} 16{com}. 
.         by year restricted_`i'_`j', sort: egen w_sum_R =sum(cell_year_sales) if restricted_`i'_`j'== 1 // by year
{txt} 17{com}. 
.         gen R_ratio = w_sum_R/w_sum_T
{txt} 18{com}. 
.         by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt} 19{com}. 
.         by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
{txt} 20{com}.         
.         gen P_ratio = p_sum_R/p_sum_T
{txt} 21{com}. 
.         *by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
.         
. 
.         *****************************************************
.         *****************************************************
.         *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
.         gen V_sum_cell = V_gap*cell_year_sales 
{txt} 22{com}. 
.         *** aggregate 
.         
.         sort year restricted_`i'_`j' 
{txt} 23{com}. 
.         by year restricted_`i'_`j', sort: egen V_sum_R =sum(V_sum_cell) if restricted_`i'_`j' == 1 // by year
{txt} 24{com}. 
.  
.         /* 
>         sum V_gap if restricted_`i'_`j' == 1 & year == 2011 //  
> 
>         sum V_gap V_sum_cell V_sum_R if restricted_`i'_`j' == 1 & year == 2011 
> 
>         codebook V_sum_R // 
> 
>         tab cell a_bin if V_gap < 0 & restricted_`i'_`j' == 1 & year == 2011 //  
>  
>         */ 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.a) sum up changes in E  and a 
.         
.         gen E_gap = e_star - e_0 
{txt} 25{com}. 
.         sum E_gap a_gap if restricted_`i'_`j' == 1 & year == 2011 // E_gap must be positive. E_0 > E*. 
{txt} 26{com}. 
.         gen E_gap_cell = E_gap*cell_year_sales 
{txt} 27{com}. 
.         sort year restricted_`i'_`j' 
{txt} 28{com}. 
.         by year restricted_`i'_`j', sort: egen E_sum_R =sum(E_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 29{com}. 
.         gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 30{com}. 
.         gen a_gap_cell = a_gap*cell_year_sales 
{txt} 31{com}.                 
.         sort year restricted_`i'_`j' 
{txt} 32{com}. 
.         by year restricted_`i'_`j', sort: egen a_sum_R =sum(a_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 33{com}. 
.         gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 34{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
.         gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations
{txt} 35{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 36{com}. 
.         by year restricted_`i'_`j', sort: egen D_sum_R =sum(D_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 37{com}. 
.         *** mean of the above. 
.         gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt} 38{com}. 
.  
.         sum D_sum_cell D_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 39{com}. 
.         *** repeat for a // zero for ABR, < 0 for flat regulations 
.         
.         gen DA_sum_cell = cell_year_sales*(a_gap)^2 // squared sum of deviations, times sales volume in cell. 
{txt} 40{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 41{com}. 
.         by year restricted_`i'_`j', sort: egen DA_sum_R =sum(DA_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 42{com}. 
.         *** mean of the above. 
.         gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt} 43{com}. 
.  
.         sum DA_sum_cell DA_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 44{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
.         gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt} 45{com}. 
. 
.         sum cv_R D_mean_R E_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 46{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 6) utility ratio  
.         display kappa 
{txt} 47{com}. 
.         gen U_ratio = V_sum_R / E_sum_R 
{txt} 48{com}.         
.         sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted_`i'_`j' if year == 2011 // 
{txt} 49{com}.         
.         quietly gen w_sum_R_`i' = w_sum_R
{txt} 50{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt} 51{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt} 52{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt} 53{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt} 54{com}.         quietly gen U_ratio_`i' = U_ratio
{txt} 55{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt} 56{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt} 57{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt} 58{com}.         quietly gen cv_R_`i' = cv_R
{txt} 59{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt} 60{com}.         quietly gen a_gap_`i' = a_gap
{txt} 61{com}.         quietly gen V_gap_`i' = V_gap 
{txt} 62{com}.         quietly gen restricted_`i' = restricted_`i'_`j'
{txt} 63{com}. * restore       
.         
. {c )-}
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331165     .483021   .0046725   1.839584
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270177    .0156642  -.0596571  -.0001515
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438188    27.21949          0    3900.29
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252876           0   .0252876   .0252876
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286263          0   4.101876
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688699           0   1.688699   1.688699
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252876           0   .0252876   .0252876
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941677           0   .0941677   .0941677
4.21919
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39850.39           0   39850.39   39850.39
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941677           0   .0941677   .0941677
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252876           0   .0252876   .0252876
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.103           0   5345.103   5345.103
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341292           0   .1341292   .1341292
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.335           0  -1292.335  -1292.335
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030538           0  -.0030538  -.0030538
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688699           0   1.688699   1.688699
{txt}{hline 13}{c +}{hline 57}
restricte~_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331175     .483021   .0046735   1.839585
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270177    .0156642  -.0596572  -.0001516
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112     .443822    27.21957          0   3900.299
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252878           0   .0252878   .0252878
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286264          0   4.101887
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688688           0   1.688688   1.688688
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252878           0   .0252878   .0252878
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941686           0   .0941686   .0941686
4.219191
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112     39850.8           0    39850.8    39850.8
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941686           0   .0941686   .0941686
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252878           0   .0252878   .0252878
{txt}{space 5}V_sum_R {c |}{res}     24,112     5345.14           0    5345.14    5345.14
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341288           0   .1341288   .1341288
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.349           0  -1292.349  -1292.349
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030539           0  -.0030539  -.0030539
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688688           0   1.688688   1.688688
{txt}{hline 13}{c +}{hline 57}
restrict~1_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331185     .483021   .0046744   1.839586
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270178    .0156642  -.0596572  -.0001516
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438253    27.21967          0   3900.311
{txt}{space 4}D_mean_R {c |}{res}     24,112     .025288           0    .025288    .025288
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286265          0   4.101897
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688677           0   1.688677   1.688677
{txt}{space 4}D_mean_R {c |}{res}     24,112     .025288           0    .025288    .025288
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941696           0   .0941696   .0941696
4.219192
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39851.21           0   39851.21   39851.21
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941696           0   .0941696   .0941696
{txt}{space 4}D_mean_R {c |}{res}     24,112     .025288           0    .025288    .025288
{txt}{space 5}V_sum_R {c |}{res}     24,112     5345.18           0    5345.18    5345.18
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341284           0   .1341284   .1341284
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.363           0  -1292.363  -1292.363
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030539           0  -.0030539  -.0030539
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688677           0   1.688677   1.688677
{txt}{hline 13}{c +}{hline 57}
restrict~2_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331195     .483021   .0046754   1.839587
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270178    .0156642  -.0596572  -.0001516
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438285    27.21975          0    3900.32
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252882           0   .0252882   .0252882
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286266          0   4.101907
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688666           0   1.688666   1.688666
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252882           0   .0252882   .0252882
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941705           0   .0941705   .0941705
4.219193
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39851.62           0   39851.62   39851.62
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941705           0   .0941705   .0941705
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252882           0   .0252882   .0252882
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.219           0   5345.219   5345.219
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112     .134128           0    .134128    .134128
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.376           0  -1292.376  -1292.376
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030539           0  -.0030539  -.0030539
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688666           0   1.688666   1.688666
{txt}{hline 13}{c +}{hline 57}
restrict~3_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331205     .483021   .0046766   1.839588
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270178    .0156642  -.0596573  -.0001517
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112     .443832    27.21984          0    3900.33
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252884           0   .0252884   .0252884
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286267          0   4.101918
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688653           0   1.688653   1.688653
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252884           0   .0252884   .0252884
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941716           0   .0941716   .0941716
4.219194
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39852.07           0   39852.07   39852.07
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941716           0   .0941716   .0941716
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252884           0   .0252884   .0252884
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.261           0   5345.261   5345.261
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341275           0   .1341275   .1341275
{txt}{space 5}a_sum_R {c |}{res}     24,112    -1292.39           0   -1292.39   -1292.39
{txt}{space 4}a_mean_R {c |}{res}     24,112    -.003054           0   -.003054   -.003054
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688653           0   1.688653   1.688653
{txt}{hline 13}{c +}{hline 57}
restrict~4_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331215     .483021   .0046775   1.839589
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270179    .0156642  -.0596573  -.0001517
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438354    27.21992          0   3900.339
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252886           0   .0252886   .0252886
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286268          0   4.101928
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688641           0   1.688641   1.688641
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252886           0   .0252886   .0252886
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941727           0   .0941727   .0941727
4.219195
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39852.51           0   39852.51   39852.51
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941727           0   .0941727   .0941727
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252886           0   .0252886   .0252886
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.302           0   5345.302   5345.302
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341271           0   .1341271   .1341271
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.404           0  -1292.404  -1292.404
{txt}{space 4}a_mean_R {c |}{res}     24,112    -.003054           0   -.003054   -.003054
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688641           0   1.688641   1.688641
{txt}{hline 13}{c +}{hline 57}
restrict~5_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331225     .483021   .0046785    1.83959
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270179    .0156642  -.0596573  -.0001517
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438385       27.22          0   3900.348
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252888           0   .0252888   .0252888
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286269          0   4.101938
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112     1.68863           0    1.68863    1.68863
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252888           0   .0252888   .0252888
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941736           0   .0941736   .0941736
4.219196
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39852.92           0   39852.92   39852.92
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941736           0   .0941736   .0941736
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252888           0   .0252888   .0252888
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.339           0   5345.339   5345.339
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341267           0   .1341267   .1341267
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.418           0  -1292.418  -1292.418
{txt}{space 4}a_mean_R {c |}{res}     24,112    -.003054           0   -.003054   -.003054
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112     1.68863           0    1.68863    1.68863
{txt}{hline 13}{c +}{hline 57}
restrict~6_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331235     .483021   .0046794   1.839591
{txt}{space 7}a_gap {c |}{res}     24,112   -.0270179    .0156642  -.0596574  -.0001518
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438417    27.22008          0   3900.358
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252889           0   .0252889   .0252889
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668     .028627          0   4.101948
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688619           0   1.688619   1.688619
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252889           0   .0252889   .0252889
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941746           0   .0941746   .0941746
4.219197
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39853.33           0   39853.33   39853.33
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941746           0   .0941746   .0941746
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252889           0   .0252889   .0252889
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.378           0   5345.378   5345.378
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341263           0   .1341263   .1341263
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.431           0  -1292.431  -1292.431
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030541           0  -.0030541  -.0030541
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688619           0   1.688619   1.688619
{txt}{hline 13}{c +}{hline 57}
restrict~7_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331245     .483021   .0046804   1.839592
{txt}{space 7}a_gap {c |}{res}     24,112    -.027018    .0156642  -.0596574  -.0001518
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438451    27.22018          0   3900.369
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252891           0   .0252891   .0252891
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668     .028627          0   4.101959
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688607           0   1.688607   1.688607
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252891           0   .0252891   .0252891
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941756           0   .0941756   .0941756
4.219198
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112    39853.74           0   39853.74   39853.74
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941756           0   .0941756   .0941756
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252891           0   .0252891   .0252891
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.418           0   5345.418   5345.418
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341259           0   .1341259   .1341259
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.445           0  -1292.445  -1292.445
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030541           0  -.0030541  -.0030541
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688607           0   1.688607   1.688607
{txt}{hline 13}{c +}{hline 57}
restrict~8_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}(24,112 real changes made)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     24,112    .8331256     .483021   .0046816   1.839593
{txt}{space 7}a_gap {c |}{res}     24,112    -.027018    .0156642  -.0596574  -.0001518
{txt}(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     24,112    .4438486    27.22027          0   3900.379
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252893           0   .0252893   .0252893
{txt}(15,488 missing values generated)
(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     24,112    .0004668    .0286271          0   4.101969
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     24,112    1.688595           0   1.688595   1.688595
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252893           0   .0252893   .0252893
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941766           0   .0941766   .0941766
4.219199
{txt}(15,488 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     24,112    423185.6           0   423185.6   423185.6
{txt}{space 5}E_sum_R {c |}{res}     24,112     39854.2           0    39854.2    39854.2
{txt}{space 4}E_mean_R {c |}{res}     24,112    .0941766           0   .0941766   .0941766
{txt}{space 4}D_mean_R {c |}{res}     24,112    .0252893           0   .0252893   .0252893
{txt}{space 5}V_sum_R {c |}{res}     24,112    5345.461           0   5345.461   5345.461
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     24,112    .1341254           0   .1341254   .1341254
{txt}{space 5}a_sum_R {c |}{res}     24,112   -1292.459           0  -1292.459  -1292.459
{txt}{space 4}a_mean_R {c |}{res}     24,112   -.0030541           0  -.0030541  -.0030541
{txt}{space 3}DA_mean_R {c |}{res}     24,112    .0000266           0   .0000266   .0000266
{txt}{space 8}cv_R {c |}{res}     24,112    1.688595           0   1.688595   1.688595
{txt}{hline 13}{c +}{hline 57}
restrict~9_3 {c |}{res}     39,600    .6088889    .4880054          0          1
{txt}
{com}. 
.                 **** case 4 ****
. scalar sigma = 0.157
{txt}
{com}. scalar case = 4
{txt}
{com}. 
. forvalues i = 4579390(1)4579399 {c -(}       
{txt}  2{com}.         
.         scalar kappa = `i'/1000000
{txt}  3{com}.         local k = kappa
{txt}  4{com}.         local j = case // first column in table  
{txt}  5{com}.         
.                 *** drop variables from previous loop 
.         drop e_gap-U_ratio // reset to overwrite 
{txt}  6{com}.         
.         gen restricted_`i'_`j' = 0 
{txt}  7{com}.         replace restricted_`i'_`j' = 1 if e_0 < kappa - sigma*a_0 - tolerance
{txt}  8{com}. 
.         
.         **** 
.         *****************************************************
.         *****************************************************
.         *** 2) predicted adjustment 
. 
. 
.         gen e_gap =     ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma) // equivalent to E_gap. 
{txt}  9{com}.         
.         gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )
{txt} 10{com}. 
.         gen  e_star =   e_gap + e_0                                     //
{txt} 11{com}. 
.         gen  a_star =   a_gap + a_0                                     //   
{txt} 12{com}.  
.         *****************************************************
.         *****************************************************
.         *** 3) evaluate Delta V. 
. 
.         gen  V_gap = 0.5*(1-gamma^2)/(1-2*sigma*gamma+sigma^2)*(e_star - e_0)^2  //  
{txt} 13{com}.         
.         ** test 
. 
.         gen  E_star = E_bar - e_star  
{txt} 14{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 4.a) sum up weights (i.e. sales volume)
.         
.         sort year restricted_`i'_`j' 
{txt} 15{com}.         
.         by year, sort: egen w_sum_T =sum(cell_year_sales)  
{txt} 16{com}. 
.         by year restricted_`i'_`j', sort: egen w_sum_R =sum(cell_year_sales) if restricted_`i'_`j'== 1 // by year
{txt} 17{com}. 
.         gen R_ratio = w_sum_R/w_sum_T
{txt} 18{com}. 
.         by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt} 19{com}. 
.         by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
{txt} 20{com}.         
.         gen P_ratio = p_sum_R/p_sum_T
{txt} 21{com}. 
.         *by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
.         
. 
.         *****************************************************
.         *****************************************************
.         *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
.         gen V_sum_cell = V_gap*cell_year_sales 
{txt} 22{com}. 
.         *** aggregate 
.         
.         sort year restricted_`i'_`j' 
{txt} 23{com}. 
.         by year restricted_`i'_`j', sort: egen V_sum_R =sum(V_sum_cell) if restricted_`i'_`j' == 1 // by year
{txt} 24{com}. 
.  
.         /* 
>         sum V_gap if restricted_`i'_`j' == 1 & year == 2011 //  
> 
>         sum V_gap V_sum_cell V_sum_R if restricted_`i'_`j' == 1 & year == 2011 
> 
>         codebook V_sum_R // 
> 
>         tab cell a_bin if V_gap < 0 & restricted_`i'_`j' == 1 & year == 2011 //  
>  
>         */ 
.  
. 
.         *****************************************************
.         *****************************************************
.         *** 5.a) sum up changes in E  and a 
.         
.         gen E_gap = e_star - e_0 
{txt} 25{com}. 
.         sum E_gap a_gap if restricted_`i'_`j' == 1 & year == 2011 // E_gap must be positive. E_0 > E*. 
{txt} 26{com}. 
.         gen E_gap_cell = E_gap*cell_year_sales 
{txt} 27{com}. 
.         sort year restricted_`i'_`j' 
{txt} 28{com}. 
.         by year restricted_`i'_`j', sort: egen E_sum_R =sum(E_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 29{com}. 
.         gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 30{com}. 
.         gen a_gap_cell = a_gap*cell_year_sales 
{txt} 31{com}.                 
.         sort year restricted_`i'_`j' 
{txt} 32{com}. 
.         by year restricted_`i'_`j', sort: egen a_sum_R =sum(a_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 33{com}. 
.         gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 34{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
.         gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations 
{txt} 35{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 36{com}. 
.         by year restricted_`i'_`j', sort: egen D_sum_R =sum(D_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 37{com}. 
.         *** mean of the above. 
.         gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt} 38{com}. 
.  
.         sum D_sum_cell D_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 39{com}. 
.         *** repeat for a //  
.         
.         gen DA_sum_cell = cell_year_sales*(a_gap)^2 // squared sum of deviations 
{txt} 40{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 41{com}. 
.         by year restricted_`i'_`j', sort: egen DA_sum_R =sum(DA_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 42{com}. 
.         *** mean of the above. 
.         gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt} 43{com}. 
.  
.         sum DA_sum_cell DA_mean_R if restricted_`i'_`j' == 1 & year == 2011 // 
{txt} 44{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
.         gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt} 45{com}. 
. 
.         sum cv_R D_mean_R E_mean_R if restricted_`i'_`j' == 1 & year == 2011 //
{txt} 46{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 6) utility ratio  
.         display kappa 
{txt} 47{com}. 
.         gen U_ratio = V_sum_R / E_sum_R 
{txt} 48{com}.         
.         sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted_`i'_`j' if year == 2011 // 
{txt} 49{com}.         
.         quietly gen w_sum_R_`i' = w_sum_R
{txt} 50{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt} 51{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt} 52{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt} 53{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt} 54{com}.         quietly gen U_ratio_`i' = U_ratio
{txt} 55{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt} 56{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt} 57{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt} 58{com}.         quietly gen cv_R_`i' = cv_R
{txt} 59{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt} 60{com}.         quietly gen a_gap_`i' = a_gap
{txt} 61{com}.         quietly gen V_gap_`i' = V_gap 
{txt} 62{com}.         quietly gen restricted_`i' = restricted_`i'_`j'
{txt} 63{com}. * restore       
.         
. {c )-}
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238252    .4202381   .0049019   1.612636
{txt}{space 7}a_gap {c |}{res}     21,080     .022858    .0132709   .0001548   .0509262
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944285    28.54075          0   3668.552
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189882           0   .0189882   .0189882
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284626          0   3.658514
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.898007           0   1.898007   1.898007
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189882           0   .0189882   .0189882
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726013           0   .0726013   .0726013
4.57939
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39850.54           0   39850.54   39850.54
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726013           0   .0726013   .0726013
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189882           0   .0189882   .0189882
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.208           0   5206.208   5206.208
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306433           0   .1306433   .1306433
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.459           0   1258.459   1258.459
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022927           0   .0022927   .0022927
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.898007           0   1.898007   1.898007
{txt}{hline 13}{c +}{hline 57}
restricte~_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238262    .4202381   .0049028   1.612637
{txt}{space 7}a_gap {c |}{res}     21,080    .0228581    .0132709   .0001548   .0509262
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944323    28.54085          0   3668.564
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189884           0   .0189884   .0189884
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284627          0   3.658523
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897989           0   1.897989   1.897989
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189884           0   .0189884   .0189884
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726022           0   .0726022   .0726022
4.579391
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39851.09           0   39851.09   39851.09
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726022           0   .0726022   .0726022
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189884           0   .0189884   .0189884
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.248           0   5206.248   5206.248
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306426           0   .1306426   .1306426
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.476           0   1258.476   1258.476
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022927           0   .0022927   .0022927
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897989           0   1.897989   1.897989
{txt}{hline 13}{c +}{hline 57}
restrict~1_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238272    .4202381    .004904   1.612638
{txt}{space 7}a_gap {c |}{res}     21,080    .0228581    .0132709   .0001549   .0509262
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080     .494436    28.54094          0   3668.573
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189885           0   .0189885   .0189885
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284628          0   3.658532
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080     1.89797           0    1.89797    1.89797
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189885           0   .0189885   .0189885
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726032           0   .0726032   .0726032
4.579392
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39851.62           0   39851.62   39851.62
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726032           0   .0726032   .0726032
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189885           0   .0189885   .0189885
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.286           0   5206.286   5206.286
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306418           0   .1306418   .1306418
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.493           0   1258.493   1258.493
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022928           0   .0022928   .0022928
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080     1.89797           0    1.89797    1.89797
{txt}{hline 13}{c +}{hline 57}
restrict~2_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238282    .4202381    .004905   1.612638
{txt}{space 7}a_gap {c |}{res}     21,080    .0228581    .0132709   .0001549   .0509263
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944397    28.54103          0   3668.582
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189886           0   .0189886   .0189886
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284629          0   3.658541
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897951           0   1.897951   1.897951
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189886           0   .0189886   .0189886
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726042           0   .0726042   .0726042
4.579393
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39852.17           0   39852.17   39852.17
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726042           0   .0726042   .0726042
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189886           0   .0189886   .0189886
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.326           0   5206.326   5206.326
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080     .130641           0    .130641    .130641
{txt}{space 5}a_sum_R {c |}{res}     21,080     1258.51           0    1258.51    1258.51
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022928           0   .0022928   .0022928
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897951           0   1.897951   1.897951
{txt}{hline 13}{c +}{hline 57}
restrict~3_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238292    .4202381   .0049059   1.612639
{txt}{space 7}a_gap {c |}{res}     21,080    .0228581    .0132709   .0001549   .0509263
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944434    28.54112          0   3668.591
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189888           0   .0189888   .0189888
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931     .028463          0   3.658551
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897933           0   1.897933   1.897933
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189888           0   .0189888   .0189888
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726052           0   .0726052   .0726052
4.579394
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080     39852.7           0    39852.7    39852.7
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726052           0   .0726052   .0726052
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189888           0   .0189888   .0189888
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.364           0   5206.364   5206.364
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306402           0   .1306402   .1306402
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.528           0   1258.528   1258.528
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022928           0   .0022928   .0022928
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897933           0   1.897933   1.897933
{txt}{hline 13}{c +}{hline 57}
restrict~4_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238302    .4202381   .0049069    1.61264
{txt}{space 7}a_gap {c |}{res}     21,080    .0228582    .0132709    .000155   .0509263
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944472    28.54121          0     3668.6
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189889           0   .0189889   .0189889
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284631          0    3.65856
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897914           0   1.897914   1.897914
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189889           0   .0189889   .0189889
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726062           0   .0726062   .0726062
4.579395
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39853.24           0   39853.24   39853.24
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726062           0   .0726062   .0726062
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189889           0   .0189889   .0189889
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.404           0   5206.404   5206.404
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306394           0   .1306394   .1306394
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.545           0   1258.545   1258.545
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022929           0   .0022929   .0022929
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897914           0   1.897914   1.897914
{txt}{hline 13}{c +}{hline 57}
restrict~5_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238311    .4202381   .0049078   1.612641
{txt}{space 7}a_gap {c |}{res}     21,080    .0228582    .0132709    .000155   .0509264
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944511     28.5413          0   3668.609
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189891           0   .0189891   .0189891
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284632          0    3.65857
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897894           0   1.897894   1.897894
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189891           0   .0189891   .0189891
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726072           0   .0726072   .0726072
4.579396
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39853.83           0   39853.83   39853.83
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726072           0   .0726072   .0726072
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189891           0   .0189891   .0189891
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.445           0   5206.445   5206.445
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306385           0   .1306385   .1306385
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.562           0   1258.562   1258.562
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022929           0   .0022929   .0022929
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897894           0   1.897894   1.897894
{txt}{hline 13}{c +}{hline 57}
restrict~6_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238321    .4202381   .0049088   1.612642
{txt}{space 7}a_gap {c |}{res}     21,080    .0228582    .0132709    .000155   .0509264
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944549    28.54139          0   3668.618
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189892           0   .0189892   .0189892
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284633          0   3.658579
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897876           0   1.897876   1.897876
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189892           0   .0189892   .0189892
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726082           0   .0726082   .0726082
4.579397
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39854.36           0   39854.36   39854.36
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726082           0   .0726082   .0726082
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189892           0   .0189892   .0189892
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.485           0   5206.485   5206.485
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306378           0   .1306378   .1306378
{txt}{space 5}a_sum_R {c |}{res}     21,080     1258.58           0    1258.58    1258.58
{txt}{space 4}a_mean_R {c |}{res}     21,080    .0022929           0   .0022929   .0022929
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897876           0   1.897876   1.897876
{txt}{hline 13}{c +}{hline 57}
restrict~7_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238331    .4202381     .00491   1.612644
{txt}{space 7}a_gap {c |}{res}     21,080    .0228583    .0132709   .0001551   .0509264
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944586     28.5415          0   3668.629
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189894           0   .0189894   .0189894
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284634          0   3.658589
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897858           0   1.897858   1.897858
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189894           0   .0189894   .0189894
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726092           0   .0726092   .0726092
4.579398
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39854.89           0   39854.89   39854.89
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726092           0   .0726092   .0726092
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189894           0   .0189894   .0189894
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.524           0   5206.524   5206.524
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080     .130637           0    .130637    .130637
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.597           0   1258.597   1258.597
{txt}{space 4}a_mean_R {c |}{res}     21,080     .002293           0    .002293    .002293
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897858           0   1.897858   1.897858
{txt}{hline 13}{c +}{hline 57}
restrict~8_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}(21,080 real changes made)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     21,080    .7238341    .4202381   .0049109   1.612645
{txt}{space 7}a_gap {c |}{res}     21,080    .0228583    .0132709   .0001551   .0509265
{txt}(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     21,080    .4944623    28.54159          0   3668.638
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189895           0   .0189895   .0189895
{txt}(18,520 missing values generated)
(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     21,080    .0004931    .0284635          0   3.658598
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     21,080    1.897839           0   1.897839   1.897839
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189895           0   .0189895   .0189895
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726102           0   .0726102   .0726102
4.579399
{txt}(18,520 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     21,080      548896           0     548896     548896
{txt}{space 5}E_sum_R {c |}{res}     21,080    39855.45           0   39855.45   39855.45
{txt}{space 4}E_mean_R {c |}{res}     21,080    .0726102           0   .0726102   .0726102
{txt}{space 4}D_mean_R {c |}{res}     21,080    .0189895           0   .0189895   .0189895
{txt}{space 5}V_sum_R {c |}{res}     21,080    5206.563           0   5206.563   5206.563
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     21,080    .1306362           0   .1306362   .1306362
{txt}{space 5}a_sum_R {c |}{res}     21,080    1258.614           0   1258.614   1258.614
{txt}{space 4}a_mean_R {c |}{res}     21,080     .002293           0    .002293    .002293
{txt}{space 3}DA_mean_R {c |}{res}     21,080    .0000189           0   .0000189   .0000189
{txt}{space 8}cv_R {c |}{res}     21,080    1.897839           0   1.897839   1.897839
{txt}{hline 13}{c +}{hline 57}
restrict~9_4 {c |}{res}     39,600    .5323232    .4989604          0          1
{txt}
{com}. 
. 
.                 **** case 5 ****
. scalar sigma = 0.188
{txt}
{com}. scalar case = 5
{txt}
{com}. 
. forvalues i = 4742720(1)4742729 {c -(}       
{txt}  2{com}.         
.         scalar kappa = `i'/1000000
{txt}  3{com}.         local k = kappa
{txt}  4{com}.         local j = case // first column in table  
{txt}  5{com}.         
.                 *** drop variables from previous loop 
.         drop e_gap-U_ratio // reset to overwrite 
{txt}  6{com}.         
.         gen restricted_`i'_`j' = 0 
{txt}  7{com}.         replace restricted_`i'_`j' = 1 if e_0 < kappa - sigma*a_0 - tolerance
{txt}  8{com}. 
.         
.         **** 
.         *****************************************************
.         *****************************************************
.         *** 2) predicted adjustment 
. 
. 
.         gen e_gap =     ( (kappa - e_0 - sigma*a_0)     /       (1 - 2*sigma*gamma + sigma^2) )   * ( 1 - sigma*gamma) // equivalent to E_gap. 
{txt}  9{com}.         
.         gen a_gap  =  -1* ( ( (gamma - sigma)* (kappa - e_0 - sigma*a_0)  )   /   (1 - 2*sigma*gamma + sigma^2) )
{txt} 10{com}. 
.         gen  e_star =   e_gap + e_0                                     // 
{txt} 11{com}. 
.         gen  a_star =   a_gap + a_0                                     // 
{txt} 12{com}. 
.  
.         *****************************************************
.         *****************************************************
.         *** 3) evaluate Delta V. 
. 
.         gen  V_gap = 0.5*(1-gamma^2)/(1-2*sigma*gamma+sigma^2)*(e_star - e_0)^2  //  
{txt} 13{com}.         
.         ** test 
. 
.         gen  E_star = E_bar - e_star  
{txt} 14{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 4.a) sum up weights (i.e. sales volume)
.         
.         sort year restricted_`i'_`j' 
{txt} 15{com}.         
.         by year, sort: egen w_sum_T =sum(cell_year_sales)  // 
{txt} 16{com}. 
.         by year restricted_`i'_`j', sort: egen w_sum_R =sum(cell_year_sales) if restricted_`i'_`j'== 1 // by year
{txt} 17{com}. 
.         gen R_ratio = w_sum_R/w_sum_T
{txt} 18{com}. 
.         by year, sort: egen p_sum_T =sum(cell_year_count) 
{txt} 19{com}. 
.         by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
{txt} 20{com}.         
.         gen P_ratio = p_sum_R/p_sum_T
{txt} 21{com}. 
.         *by year restricted_`i'_`j', sort: egen p_sum_R =sum(cell_year_count) if restricted_`i'_`j' == 1 // by year
.         
. 
.         *****************************************************
.         *****************************************************
.         *** 4.b) sum up Delta V 
. 
.         *** at cell level 
. 
.         gen V_sum_cell = V_gap*cell_year_sales 
{txt} 22{com}. 
.         *** aggregate 
.         
.         sort year restricted_`i'_`j' 
{txt} 23{com}. 
.         by year restricted_`i'_`j', sort: egen V_sum_R =sum(V_sum_cell) if restricted_`i'_`j' == 1 // by year
{txt} 24{com}. 
.  
.         /* 
>         sum V_gap if restricted_`i'_`j' == 1 & year == 2011 //  
> 
>         sum V_gap V_sum_cell V_sum_R if restricted_`i'_`j' == 1 & year == 2011 
> 
>         codebook V_sum_R // 
> 
>         tab cell a_bin if V_gap < 0 & restricted_`i'_`j' == 1 & year == 2011 //  
>  
>         */ 
. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.a) sum up changes in E  and a 
. 
. 
.         gen E_gap = e_star - e_0 
{txt} 25{com}. 
.         sum E_gap a_gap if restricted_`i'_`j' == 1 & year == 2011 // E_gap must be positive. E_0 > E*. 
{txt} 26{com}. 
.         gen E_gap_cell = E_gap*cell_year_sales 
{txt} 27{com}. 
.         sort year restricted_`i'_`j' 
{txt} 28{com}. 
.         by year restricted_`i'_`j', sort: egen E_sum_R =sum(E_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 29{com}. 
.         gen E_mean_R = E_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 30{com}. 
.         gen a_gap_cell = a_gap*cell_year_sales 
{txt} 31{com}.                 
.         sort year restricted_`i'_`j' 
{txt} 32{com}. 
.         by year restricted_`i'_`j', sort: egen a_sum_R =sum(a_gap_cell) if restricted_`i'_`j'== 1 // by year, replace 
{txt} 33{com}. 
.         gen a_mean_R = a_sum_R/w_sum_R // mean distance among restricted_`i'_`j' consumers. 
{txt} 34{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 5.b) construct variance 
. 
.         *** at cell level for E 
. 
.         gen D_sum_cell = cell_year_sales*(E_gap)^2 // squared sum of deviations 
{txt} 35{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 36{com}. 
.         by year restricted_`i'_`j', sort: egen D_sum_R =sum(D_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 37{com}. 
.         *** mean of the above. 
.         gen D_mean_R = D_sum_R / w_sum_R // mean of squared deviations
{txt} 38{com}. 
.  
.         sum D_sum_cell D_mean_R if restricted_`i'_`j' == 1 & year == 2011 //  
{txt} 39{com}. 
.         *** repeat for a 
.         
.         gen DA_sum_cell = cell_year_sales*(a_gap)^2 // squared sum of deviations
{txt} 40{com}. 
.         *** aggregate in R 
.         sort year restricted_`i'_`j' 
{txt} 41{com}. 
.         by year restricted_`i'_`j', sort: egen DA_sum_R =sum(DA_sum_cell) if restricted_`i'_`j'== 1 // sum over R. 
{txt} 42{com}. 
.         *** mean of the above. 
.         gen DA_mean_R = DA_sum_R / w_sum_R // mean of squared deviations
{txt} 43{com}. 
.  
.         sum DA_sum_cell DA_mean_R if restricted_`i'_`j' == 1 & year == 2011 
{txt} 44{com}. 
.         *****************************************************
.         *****************************************************
.         *** 5.c) construct coefficient of variation 
. 
.         *** at cell level 
. 
.         gen cv_R = sqrt(D_mean_R)/E_mean_R // std. deviation / mean. 
{txt} 45{com}. 
. 
.         sum cv_R D_mean_R E_mean_R if restricted_`i'_`j' == 1 & year == 2011 
{txt} 46{com}. 
. 
.         *****************************************************
.         *****************************************************
.         *** 6) utility ratio  
.         display kappa 
{txt} 47{com}. 
.         gen U_ratio = V_sum_R / E_sum_R 
{txt} 48{com}.         
.         sum w_sum_R E_sum_R E_mean_R D_mean_R V_sum_R U_ratio a_sum_R a_mean_R DA_mean_R cv_R restricted_`i'_`j' if year == 2011 // 
{txt} 49{com}.         
.         quietly gen w_sum_R_`i' = w_sum_R
{txt} 50{com}.         quietly gen E_sum_R_`i' = E_sum_R
{txt} 51{com}.         quietly gen E_mean_R_`i' = E_mean_R 
{txt} 52{com}.         quietly gen D_mean_R_`i' = D_mean_R
{txt} 53{com}.         quietly gen V_sum_R_`i' = V_sum_R
{txt} 54{com}.         quietly gen U_ratio_`i' = U_ratio
{txt} 55{com}.         quietly gen a_sum_R_`i' = a_sum_R
{txt} 56{com}.         quietly gen a_mean_R_`i' = a_mean_R
{txt} 57{com}.         quietly gen DA_mean_R_`i' = DA_mean_R
{txt} 58{com}.         quietly gen cv_R_`i' = cv_R
{txt} 59{com}.         
.         quietly gen e_gap_`i' = e_gap 
{txt} 60{com}.         quietly gen a_gap_`i' = a_gap
{txt} 61{com}.         quietly gen V_gap_`i' = V_gap 
{txt} 62{com}.         quietly gen restricted_`i' = restricted_`i'_`j'
{txt} 63{com}. * restore       
.         
. {c )-}
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760404    .4076343   .0050371   1.671025
{txt}{space 7}a_gap {c |}{res}     19,384    .0429004    .0258678   .0003197   .1060404
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209652    28.42851          0   3410.327
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201209           0   .0201209   .0201209
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384    .0020979    .1144803          0   13.73323
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786446           0   1.786446   1.786446
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201209           0   .0201209   .0201209
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794024           0   .0794024   .0794024
4.74272
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39850.95           0   39850.95   39850.95
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794024           0   .0794024   .0794024
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201209           0   .0201209   .0201209
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.578           0   5029.578   5029.578
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262097           0   .1262097   .1262097
{txt}{space 5}a_sum_R {c |}{res}     19,384    2528.874           0   2528.874   2528.874
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050387           0   .0050387   .0050387
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786446           0   1.786446   1.786446
{txt}{hline 13}{c +}{hline 57}
restricte~_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760414    .4076343   .0050383   1.671026
{txt}{space 7}a_gap {c |}{res}     19,384    .0429004    .0258678   .0003197   .1060405
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209693    28.42861          0   3410.336
{txt}{space 4}D_mean_R {c |}{res}     19,384     .020121           0    .020121    .020121
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384    .0020979    .1144807          0   13.73327
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786431           0   1.786431   1.786431
{txt}{space 4}D_mean_R {c |}{res}     19,384     .020121           0    .020121    .020121
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794034           0   .0794034   .0794034
4.742721
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39851.45           0   39851.45   39851.45
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794034           0   .0794034   .0794034
{txt}{space 4}D_mean_R {c |}{res}     19,384     .020121           0    .020121    .020121
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.618           0   5029.618   5029.618
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262092           0   .1262092   .1262092
{txt}{space 5}a_sum_R {c |}{res}     19,384    2528.905           0   2528.905   2528.905
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050388           0   .0050388   .0050388
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786431           0   1.786431   1.786431
{txt}{hline 13}{c +}{hline 57}
restrict~1_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760424    .4076343   .0050392   1.671027
{txt}{space 7}a_gap {c |}{res}     19,384    .0429005    .0258678   .0003198   .1060405
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209733     28.4287          0   3410.344
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201212           0   .0201212   .0201212
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384    .0020979    .1144811          0    13.7333
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786415           0   1.786415   1.786415
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201212           0   .0201212   .0201212
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794044           0   .0794044   .0794044
4.742722
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39851.95           0   39851.95   39851.95
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794044           0   .0794044   .0794044
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201212           0   .0201212   .0201212
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.656           0   5029.656   5029.656
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262085           0   .1262085   .1262085
{txt}{space 5}a_sum_R {c |}{res}     19,384    2528.937           0   2528.937   2528.937
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050389           0   .0050389   .0050389
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786415           0   1.786415   1.786415
{txt}{hline 13}{c +}{hline 57}
restrict~2_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760434    .4076343   .0050402   1.671028
{txt}{space 7}a_gap {c |}{res}     19,384    .0429006    .0258678   .0003198   .1060406
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209775    28.42879          0   3410.353
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201214           0   .0201214   .0201214
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384     .002098    .1144815          0   13.73334
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384      1.7864           0     1.7864     1.7864
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201214           0   .0201214   .0201214
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794054           0   .0794054   .0794054
4.742723
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39852.46           0   39852.46   39852.46
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794054           0   .0794054   .0794054
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201214           0   .0201214   .0201214
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.696           0   5029.696   5029.696
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262079           0   .1262079   .1262079
{txt}{space 5}a_sum_R {c |}{res}     19,384    2528.968           0   2528.968   2528.968
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050389           0   .0050389   .0050389
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384      1.7864           0     1.7864     1.7864
{txt}{hline 13}{c +}{hline 57}
restrict~3_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760444    .4076343   .0050411   1.671029
{txt}{space 7}a_gap {c |}{res}     19,384    .0429006    .0258678   .0003199   .1060407
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209815    28.42888          0   3410.362
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201215           0   .0201215   .0201215
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384     .002098    .1144818          0   13.73338
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786384           0   1.786384   1.786384
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201215           0   .0201215   .0201215
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794064           0   .0794064   .0794064
4.742724
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39852.96           0   39852.96   39852.96
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794064           0   .0794064   .0794064
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201215           0   .0201215   .0201215
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.735           0   5029.735   5029.735
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262073           0   .1262073   .1262073
{txt}{space 5}a_sum_R {c |}{res}     19,384        2529           0       2529       2529
{txt}{space 4}a_mean_R {c |}{res}     19,384     .005039           0    .005039    .005039
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786384           0   1.786384   1.786384
{txt}{hline 13}{c +}{hline 57}
restrict~4_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760454    .4076343   .0050421   1.671031
{txt}{space 7}a_gap {c |}{res}     19,384    .0429007    .0258678     .00032   .1060407
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209855    28.42899          0   3410.373
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201217           0   .0201217   .0201217
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384     .002098    .1144822          0   13.73341
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786369           0   1.786369   1.786369
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201217           0   .0201217   .0201217
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794074           0   .0794074   .0794074
4.742725
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39853.45           0   39853.45   39853.45
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794074           0   .0794074   .0794074
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201217           0   .0201217   .0201217
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.774           0   5029.774   5029.774
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262068           0   .1262068   .1262068
{txt}{space 5}a_sum_R {c |}{res}     19,384    2529.031           0   2529.031   2529.031
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050391           0   .0050391   .0050391
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786369           0   1.786369   1.786369
{txt}{hline 13}{c +}{hline 57}
restrict~5_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760464    .4076343    .005043   1.671031
{txt}{space 7}a_gap {c |}{res}     19,384    .0429007    .0258678     .00032   .1060408
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209896    28.42908          0   3410.382
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201218           0   .0201218   .0201218
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384     .002098    .1144826          0   13.73345
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786354           0   1.786354   1.786354
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201218           0   .0201218   .0201218
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794083           0   .0794083   .0794083
4.742726
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39853.94           0   39853.94   39853.94
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794083           0   .0794083   .0794083
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201218           0   .0201218   .0201218
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.813           0   5029.813   5029.813
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262062           0   .1262062   .1262062
{txt}{space 5}a_sum_R {c |}{res}     19,384    2529.063           0   2529.063   2529.063
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050391           0   .0050391   .0050391
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786354           0   1.786354   1.786354
{txt}{hline 13}{c +}{hline 57}
restrict~6_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760473    .4076343   .0050442   1.671032
{txt}{space 7}a_gap {c |}{res}     19,384    .0429008    .0258678   .0003201   .1060408
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209936    28.42918          0    3410.39
{txt}{space 4}D_mean_R {c |}{res}     19,384     .020122           0    .020122    .020122
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384     .002098     .114483          0   13.73349
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786339           0   1.786339   1.786339
{txt}{space 4}D_mean_R {c |}{res}     19,384     .020122           0    .020122    .020122
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794093           0   .0794093   .0794093
4.742727
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39854.42           0   39854.42   39854.42
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794093           0   .0794093   .0794093
{txt}{space 4}D_mean_R {c |}{res}     19,384     .020122           0    .020122    .020122
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.852           0   5029.852   5029.852
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262056           0   .1262056   .1262056
{txt}{space 5}a_sum_R {c |}{res}     19,384    2529.094           0   2529.094   2529.094
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050392           0   .0050392   .0050392
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786339           0   1.786339   1.786339
{txt}{hline 13}{c +}{hline 57}
restrict~7_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760483    .4076343   .0050452   1.671033
{txt}{space 7}a_gap {c |}{res}     19,384    .0429009    .0258678   .0003202   .1060409
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5209977    28.42927          0   3410.399
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201221           0   .0201221   .0201221
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384     .002098    .1144834          0   13.73352
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786324           0   1.786324   1.786324
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201221           0   .0201221   .0201221
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794103           0   .0794103   .0794103
4.742728
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39854.91           0   39854.91   39854.91
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794103           0   .0794103   .0794103
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201221           0   .0201221   .0201221
{txt}{space 5}V_sum_R {c |}{res}     19,384    5029.892           0   5029.892   5029.892
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262051           0   .1262051   .1262051
{txt}{space 5}a_sum_R {c |}{res}     19,384    2529.126           0   2529.126   2529.126
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050392           0   .0050392   .0050392
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786324           0   1.786324   1.786324
{txt}{hline 13}{c +}{hline 57}
restrict~8_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}(19,384 real changes made)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}E_gap {c |}{res}     19,384    .6760493    .4076343   .0050461   1.671034
{txt}{space 7}a_gap {c |}{res}     19,384    .0429009    .0258678   .0003202    .106041
{txt}(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}D_sum_cell {c |}{res}     19,384    .5210017    28.42936          0   3410.408
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201223           0   .0201223   .0201223
{txt}(20,216 missing values generated)
(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}DA_sum_cell {c |}{res}     19,384    .0020981    .1144837          0   13.73356
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}cv_R {c |}{res}     19,384    1.786308           0   1.786308   1.786308
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201223           0   .0201223   .0201223
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794113           0   .0794113   .0794113
4.742729
{txt}(20,216 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}w_sum_R {c |}{res}     19,384      501886           0     501886     501886
{txt}{space 5}E_sum_R {c |}{res}     19,384    39855.42           0   39855.42   39855.42
{txt}{space 4}E_mean_R {c |}{res}     19,384    .0794113           0   .0794113   .0794113
{txt}{space 4}D_mean_R {c |}{res}     19,384    .0201223           0   .0201223   .0201223
{txt}{space 5}V_sum_R {c |}{res}     19,384     5029.93           0    5029.93    5029.93
{txt}{hline 13}{c +}{hline 57}
{space 5}U_ratio {c |}{res}     19,384    .1262044           0   .1262044   .1262044
{txt}{space 5}a_sum_R {c |}{res}     19,384    2529.157           0   2529.157   2529.157
{txt}{space 4}a_mean_R {c |}{res}     19,384    .0050393           0   .0050393   .0050393
{txt}{space 3}DA_mean_R {c |}{res}     19,384     .000081           0    .000081    .000081
{txt}{space 8}cv_R {c |}{res}     19,384    1.786308           0   1.786308   1.786308
{txt}{hline 13}{c +}{hline 57}
restrict~9_5 {c |}{res}     39,600    .4894949    .4998959          0          1
{txt}
{com}. 
.                 ** weights ** 
. gen sw = round(cell_year_sales, 1) // wieghts must be integer
{txt}
{com}. replace sw = 0 if cell_year_sales < 0 // 
{txt}(0 real changes made)

{com}. 
. 
. save welfare_table_output, replace // intermediate save 
{txt}{p 0 4 2}
(file {bf}
welfare_table_output.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
welfare_table_output.dta{rm}
saved
{p_end}

{com}. 
. log close 
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\hy65byfe\Desktop\smerge_0712\welfare_analysis_table.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}29 Mar 2023, 15:37:31
{txt}{.-}
{smcl}
{txt}{sf}{ul off}